I am a beginer of compass sass,I want to know how to how to construct a compass sass project with high efficiency. Is there any existed compass sass framework in github . Or can any experienced developer suggest me how to write a good compass sass project .Thank you very much.
相关问题
- How to load font from @font-face with Parcel?
- How to include a safari only style in scss ? [dupl
- Jest and SCSS variables
- how to remove ionic 4 segment indicator (bottom li
- Editing Ionic tab icon styles
相关文章
- How can a browser know the scss files?
- How to override Bootstrap mixin without modifying
- Sass @use not loading partial
- Webpack sass loader does not recognize global vari
- Passing in variable values when calling `sass` fro
- Angular: transclusion, set color of SVG element
- Possible to override the default gutter value for
- SASS task in gulp with sourceComments: 'map
Various frameworks have been ported to work with Compass, but I don't recommend them. The common CSS frameworks are built to be one-size-fits-all, because that's the best you can do with a pre-set list of CSS classes. With Sass you can build much more targeted and flexible tools, and then combine them all in unique ways using Compass.
There are several already-answered SO questions that are relevant to what you are asking:
@extends
.Keep mixins and silent classes (like
%mgb5
) as simple as possible without losing meaning. It's a good rule for classes in general.nav
is short and still easy to understand,mgb5
is not as much. The same rule can guide you inside the mixin/class. If you only have one property, the mixin/class may not mean much. If you have thirty, it's probably trying to do carry too much meaning. Split larger mixins/classes into smaller ones for more flexibility, as long as each one represents a distinct and meaningful action.The same basic guidelines apply for static css vs. variables. If any rule has a purpose that isn't clear in the plain css, then it should become part of a mixin, function, or variable that gives it the desired meaning. If
18px
is just a size that seems good to you for now,18px
is just fine. But if18px
is part of a set scale of sizes, or has a specific purpose, name it:$large: 18px;
or$gutter-width: 18px;
.