Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Support sass-embedded as alternative implementation #124
Support sass-embedded as alternative implementation #124
Changes from 30 commits
b7a6695
7fd9cb6
13c7419
8ca9d6d
3007b82
e3cc37c
e8714e0
1caf7e6
1636e1b
472c1b3
e7ca22a
174c81d
de9abbe
2ddbbfc
01add9c
2eda70b
fa334af
942dcfe
1e3031f
f6cf7a1
c7188aa
0c0b77d
6e14bee
62e62b9
f991914
e012438
99faa86
463adf7
2046ba9
b9ddc2f
55a485f
8f00f40
bb410b8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we have two different defaults for the implementation? That seems counter to what I'd expect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle
The reason is that dart-sass has dropped support for
compact
andnested
, and we don't want to change the default forsassc
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. What happens if I specify an unsupported output style? Do I see an error? What does that error look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/ntkme/sass-embedded-host-ruby/blob/8913a3f521db5c2485344701745bd2839a68a59f/lib/sass/embedded/compile_context.rb#L218
But in this PR we check for the input and fallback to the respective default value so user won’t see any error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we send a warn if the implementation is not allowed so the user can fix their config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is aligned with the
style
option that it fallbacks to default value without warning. Shall we add warning for both?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to warn the user that we don't support the value they asked for. Maybe in another PR if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need to use Jekyll.sanitized_path, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be safe as:
File.join
is simply: base + '/' + path. It is concatenated as is without any expansion.sass_page.path
is the path to sass page e.g.css/main.scss
- this is provided by jekyll. Since jekyll only process files inside current project, this should be safe to use.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens for symlinks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parkr I just tested and
Jekyll.sanitized_path
does not do anything different for symlinks. If file is a symlink,sass_page.path
still returns the original unresolved path.In the end when Jekyll process "pages" collection, it does not seem to care if a "page" is a symlink to a file outside of the project or not. I would say that is a problem of Jekyll pages collection, not something we should deal with here.