-
Notifications
You must be signed in to change notification settings - Fork 322
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
Values that include color-names are rewritten to have hex-codes in them #450
Milestone
Comments
Good catch @fangel! It sneaked into 3.x as it was fine in <= 2.2. Please quote the value for the time being, i.e.: |
Using quotes is a much better fix than the kludge I snuck into my Grunt build-process - namely doing string-replace post-processing, hahaha. But thanks for looking at this issue, and thanks for a great library! |
I'll fix it soon. Cheers! |
jakubpawlowicz
added a commit
that referenced
this issue
Jan 31, 2015
Regexp matching color names was too greedy and was matching some other values as well. On the downside we need to run the replacement twice. On the upside it extracts replacement functions so we get a slight speed boost.
jakubpawlowicz
added a commit
that referenced
this issue
Jan 31, 2015
Regexp matching color names was too greedy and was matching some other values as well. On the downside we need to run the replacement twice. On the upside it extracts replacement functions so we get a slight speed boost.
@fangel Fixed in 3.0.8! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I have a font with a -black variation that I load through a
@font-face
. E.g.However, because alightsanslp-black matches the regexp in
/lib/colors/hex-name-shortener.js
, this will get optimised into (white-space added back in, to look like the input-file)That is, the font-family in
.font-black
is nowalrightsanslp-#000
instead ofalrightsanslp-black
, because the hex-name-shortener replaceblack
with#000
.The pattern is:
In my opinion the pattern should have some sort of guard in front of it, so that
-black
or similar isn't converted.Kind regards
Morten
The text was updated successfully, but these errors were encountered: