Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic support for indented sass #25

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

antonyfaris
Copy link
Member

Fixes #9
This is a temporarily fix until a SASS prettier plugin is made available.
The content of the style tag won't be indented.
The output will be like this:

<style lang="sass">
$bg: #1E1E1E
$text: #9cdcfe
$shadow: #0002
$fonts: monaco, Consolas, 'Lucida Console', monospace

body
  padding: 0
  margin: 0
  background: $bg

.header
  background: lighten($bg, 2.5)
  box-shadow: 0 1px 4px $shadow
  justify-content: center
</style>

Instead for this:

<style lang="sass">
  $bg: #1E1E1E
  $text: #9cdcfe
  $shadow: #0002
  $fonts: monaco, Consolas, 'Lucida Console', monospace

  body
    padding: 0
    margin: 0
    background: $bg

  .header
    background: lighten($bg, 2.5)
    box-shadow: 0 1px 4px $shadow
    justify-content: center
</style>

Copy link
Member

@drwpow drwpow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Clean implementation, too. I don’t have any feedback other than “this looks great!” :shipit:

@drwpow drwpow merged commit 395b3bd into withastro:main Oct 6, 2021
@antonyfaris antonyfaris deleted the feature/sass branch October 7, 2021 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: SASS Indented Syntax not supported on <style lang="sass">
2 participants