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

Alternative formatting CSS code rgba (Jekyll sass doesn't like spaces) #1778

Closed
svrooij opened this issue Nov 29, 2021 · 5 comments · Fixed by #1781
Closed

Alternative formatting CSS code rgba (Jekyll sass doesn't like spaces) #1778

svrooij opened this issue Nov 29, 2021 · 5 comments · Fixed by #1781

Comments

@svrooij
Copy link

svrooij commented Nov 29, 2021

The following code is incorrect:

The rgba function requires 4 arguments, so rgba(255 255 255 / 0.15) should be rgba(255, 255, 255, 0.15).

At least that fixed my Jekyll error:

/usr/gem/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb:123:in `rescue in convert': wrong number of arguments (1 for 4) for `rgba' on line 16 (Jekyll::Converters::Scss::SyntaxError)

background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%), var(--color-mktg-btn-bg) !important;

and

background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%) !important;

@simurai
Copy link
Contributor

simurai commented Nov 30, 2021

@svrooij Thanks for the report, should be changed in #1781.

@tobiasahlin
Copy link
Contributor

FWIW this is just Jekyll acting up, this is the functional color syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgba()

@svrooij
Copy link
Author

svrooij commented Nov 30, 2021

@tobiasahlin Does this mean you're against approving this PR to change the CSS, and actually want them to fix the jekyll sass compiler?

I was using the marketing css in a Github Page. And it screamed error. I created an issue on Jekyll-sass-converter as well, would the above PR be acceptable as a quick fix?

@svrooij svrooij changed the title Wrong CSS code rgba Alternative formatting CSS code rgba (Jekyll sass doesn't like spaces) Nov 30, 2021
@tobiasahlin
Copy link
Contributor

Not against a fix at all if this error is being thrown on GitHub Pages 🙏 just want to call out that this formatting is not "wrong" from a standards point of view. We can totally fix it locally while encouraging that it's also fixed in the converter (like you just did—thanks for opening that issue @svrooij!)

@svrooij
Copy link
Author

svrooij commented Nov 30, 2021

just want to call out that this formatting is not "wrong" from a standards point of view.

And that is why I also changed the title of this issue. 😄

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 a pull request may close this issue.

3 participants