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

Template CSS selector improvement #60

Closed
saltymouse opened this issue Aug 3, 2018 · 1 comment
Closed

Template CSS selector improvement #60

saltymouse opened this issue Aug 3, 2018 · 1 comment

Comments

@saltymouse
Copy link

It seems like we could save a few bytes by using a using a starts-with selector to apply the general icon styles rather than generating a long list.

Current generated list:

[ ... ]
.icon-message-alert:before,
.icon-news:before,
.icon-coupon:before,
.icon-twitter-box:before,
.icon-twitter:before {
  font-family: "RadicalFont";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  text-decoration: none;
  text-transform: none; }

Smaller pattern-based selector:

[class^="icon-"]:before {
  font-family: "RadicalFont";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  text-decoration: none;
  text-transform: none; }
@saltymouse
Copy link
Author

saltymouse commented Aug 3, 2018

Just realised you've already addressed this in #56 & #50. I guess I'll just customise my template.

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

No branches or pull requests

1 participant