-
Notifications
You must be signed in to change notification settings - Fork 186
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
escaped dashicon not working #455
Comments
actually that's not all - the whole font-family declaration is stripped as well !!!!! |
Do you apply CSSO before CSS preprocessor? |
couldn't tell you - it is a built in feature to use CSSO in the codekit app
(https://codekitapp.com) - you may want to get in touch with that developer
but as I said escaped strings turn out to be empty and yesterday I
discovered that the whole font-family declaration was removed as well.
…On Thu, May 19, 2022 at 2:12 AM Denis Ryabov ***@***.***> wrote:
Do you apply CSSO before CSS preprocessor?
—
Reply to this email directly, view it on GitHub
<#455 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL3RFDOIWY4Y76YBFN7SITVKYAXPANCNFSM5WCH6SOQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Marco M. Jaeger
h <http://net4visions.com>ttps://mmjaeger.com ||
https://www.instagram.com/marco.m.jaeger
|
Seems I've found where the issue comes from. Usually the Most likely, the simplest solution is to fix the |
Not sure whether I'm following you - I do have a font family declaration in
my scss file - it gets fully stripped when compressing - this is the full
scss:
/* Read more
----------------------------------------------------------------------------
*/
a.read-more {
font-size: 0.8em;
text-transform: uppercase;
&:after {
font-family: "dashicons";
content: '\f344'; // arrow-right
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1;
vertical-align: middle;
margin-bottom: 2px;
margin-left: 5px;
}
}
…On Thu, May 19, 2022 at 5:01 AM Denis Ryabov ***@***.***> wrote:
Seems I've found where the issue comes from. Usually the font property
(in your example it is font: normal 16px/1) overrides all previous font-*
properties. But in you example the font rule is malformed (font family is
not specified), and so the browser drops it and uses previous font-family
rule. In turn, CSSO firstly detects that font rule exist and previous
font-family rule may be removed, and then it founds that font is
malformed and may be safely removed too. As a result, both font-related
properties are removed.
Most likely, the simplest solution is to fix the font property, e.g. by
including font family there (font: normal 16px/1 "dashicons").
—
Reply to this email directly, view it on GitHub
<#455 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL3RFDJONWO5INTMEZOVITVKYUSXANCNFSM5WCH6SOQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Marco M. Jaeger
h <http://net4visions.com>ttps://mmjaeger.com ||
https://www.instagram.com/marco.m.jaeger
|
tried to replace what I had with your font declaration - not working - this
is what I'm getting:
a.read-more{font-size:.8em;text-transform:uppercase}a.read-more:after{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:16px/1;vertical-align:middle;margin-bottom:2px;margin-left:5px}
the content is still empty and font family is not declared
…On Thu, May 19, 2022 at 10:48 AM Marco M. Jaeger ***@***.***> wrote:
Not sure whether I'm following you - I do have a font family declaration
in my scss file - it gets fully stripped when compressing - this is the
full scss:
/* Read more
----------------------------------------------------------------------------
*/
a.read-more {
font-size: 0.8em;
text-transform: uppercase;
&:after {
font-family: "dashicons";
content: '\f344'; // arrow-right
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1;
vertical-align: middle;
margin-bottom: 2px;
margin-left: 5px;
}
}
On Thu, May 19, 2022 at 5:01 AM Denis Ryabov ***@***.***>
wrote:
> Seems I've found where the issue comes from. Usually the font property
> (in your example it is font: normal 16px/1) overrides all previous font-*
> properties. But in you example the font rule is malformed (font family
> is not specified), and so the browser drops it and uses previous
> font-family rule. In turn, CSSO firstly detects that font rule exist and
> previous font-family rule may be removed, and then it founds that font
> is malformed and may be safely removed too. As a result, both font-related
> properties are removed.
>
> Most likely, the simplest solution is to fix the font property, e.g. by
> including font family there (font: normal 16px/1 "dashicons").
>
> —
> Reply to this email directly, view it on GitHub
> <#455 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAL3RFDJONWO5INTMEZOVITVKYUSXANCNFSM5WCH6SOQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
--
Marco M. Jaeger
h <http://net4visions.com>ttps://mmjaeger.com ||
https://www.instagram.com/marco.m.jaeger
--
Marco M. Jaeger
h <http://net4visions.com>ttps://mmjaeger.com ||
https://www.instagram.com/marco.m.jaeger
|
Look at this line in your CSS code: font: normal 16px/1; It's malformed, because it doesn't contain the font family, though CSS spec requires it. |
this is what I'm getting:
a.read-more{font-size:.8em;text-transform:uppercase}a.read-more:after{font:16px/1"dashicons";content:"";display:inline-block;-webkit-font-smoothing:antialiased;vertical-align:middle;margin-bottom:2px;margin-left:5px}
content declaration is still not working using the following scss:
a.read-more {
font-size: 0.8em;
text-transform: uppercase;
&:after {
font: normal 16px/1 "dashicons";
//font-family: "dashicons";
content: '\f344'; // arrow-right
display: inline-block;
-webkit-font-smoothing: antialiased;
vertical-align: middle;
margin-bottom: 2px;
margin-left: 5px;
}
}
…On Thu, May 19, 2022 at 11:30 AM Denis Ryabov ***@***.***> wrote:
Look at this line in your CSS code:
font: normal 16px/1;
It's malformed, because it doesn't contain the font family, though CSS
spec requires it.
—
Reply to this email directly, view it on GitHub
<#455 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL3RFG2JV2FULTW3KZ6323VK2CCXANCNFSM5WCH6SOQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Marco M. Jaeger
h <http://net4visions.com>ttps://mmjaeger.com ||
https://www.instagram.com/marco.m.jaeger
|
Hello
the following code isn't working after compressing:
`a.read-more {
font-size: 0.8em;
text-transform: uppercase;
}`
this line fails: content: '\f344'; // arrow-right - it ends up as empty string !!
how this gets fixed soon.
The text was updated successfully, but these errors were encountered: