question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] @font-face accidental prefixing

See original GitHub issue

Before

.class-selector
  @font-face
    font-family: 'icons'

  @keyframes inv-ajax-loader-spin
    0%
      transform: scale(1) rotate(0deg)

    50%
      transform: scale(1.2) rotate(180deg)

    100%
      transform: scale(1) rotate(360deg)

After

@font-face {
  .class-selector {
    font-family: "icons"; } }
@keyframes inv-ajax-loader-spin {
  0% {
    transform: scale(1) rotate(0deg); }
  50% {
    transform: scale(1.2) rotate(180deg); }
  100% {
    transform: scale(1) rotate(360deg); } }

/*# sourceMappingURL=icons.css.map */

Correct

@font-face {
    font-family: "icons"; } 
@keyframes inv-ajax-loader-spin {
  0% {
    transform: scale(1) rotate(0deg); }
  50% {
    transform: scale(1.2) rotate(180deg); }
  100% {
    transform: scale(1) rotate(360deg); } }

/*# sourceMappingURL=icons.css.map */

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nex3commented, Jan 19, 2018

@martinoppitz If you’re willing to volunteer in perpetuity to maintain a list of all CSS at-rules that cannot contain style rules, as well as test cases for that logic and the code to implement it across the three major implementations, then we can add this feature. But I’m not willing to allocate my time to perpetually chasing CSS specs any more than necessary.

1reaction
deleoniocommented, Jan 13, 2018

Compare with less (https://lesstester.com)

.class-selector{
  @font-face{
    font-family: 'icons'}
  

  .kjh{
    display : none
  }}

After

@font-face {
  font-family: 'icons';
}
.class-selector .kjh {
  display: none;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Not allowing pages to choose their own fonts breaks with icon ...
Currently, unless "use own fonts" is turned off, we will > download any webfonts that are called for by the font-family property, >...
Read more >
System Font Stack | CSS-Tricks
Method 1: System Fonts at the Element Level. Chrome and Safari have recently shipped “system-ui” which is a generic font family that can...
Read more >
CSS Fonts Module Level 4 - W3C
Abstract. This specification defines modifications to the existing CSS Fonts 3 specification along with additional features.
Read more >
fix(list): add font-family style to subheader by chouclee · Pull ... - GitHub
Fixes #1777.
Read more >
SPCAF | CSL308816: Use bulletproof font face in CSS
This rule is aimed at preventing 404 errors in Internet Explorer 8 and earlier due to a bug in how web font URLs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found