I almost completely switched to Sass in the past year. So organzing my CSS code has become a mission of mine :)
Structure is especially needed, when you are not the only one working on the design. So that everyone on the team can easily understand and contribute with ease. There are never too many files, as files get combined anyway.
Make your own life easier and for those you work with!
Currently applying the following structure on newer projects:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
sass/ | |– base/ | |– _reset.scss # Reset/normalize | |– _typography.scss # Typography rules | ... # etc… | |– components/ | |– _buttons.scss # Buttons | |– _carousel.scss # Carousel | |– _images.scss # Images | |– _dropdown.scss # Dropdown | |– _navigation.scss # Navigation | ... # etc… | |– utils/ | |– _variables.scss # Sass Variables | |– _functions.scss # Sass Functions | |– _mixins.scss # Sass Mixins | |– _utils.scss # Class & placeholders helpers | ... # etc… | |– layout/ | |– _grid.scss # Grid system | |– _header.scss # Header | |– _footer.scss # Footer | |– _sidebar.scss # Sidebar | |– _forms.scss # Forms | ... # etc… | |– sections/ | |– _home.scss # Home specific styles | |– _about_us.scss # About us specific styles | ... # etc… | |– themes/ | |– _front_base.scss # Parent theme | |– _front_child.scss # Child theme | |– _admin.scss # Admin theme | ... # etc… | |– vendors/ | |– _bootstrap.scss # Bootstrap | |– _bourbon.scss # Bourbon Mixins | ... # etc… | | `– app.scss # primary Sass file |
Which architecture fits your project & team will vary.
Nice simple addon to add a loading animation to your Bootstrap buttons, when doing Ajax requests. Always better to let users know, that your system is doing something ;)
„The picture element, srcset and sizes attributes, and associated features allow web developers to deliver an appropriate image to every user depending on a variety of conditions like screen size, viewport size, screen resolution, and more. Picturefill enables support for the picture element and associated features in browsers that do not yet support them, so you can start using them today!“
1 |
<img srcset="examples/images/large.jpg 1x, examples/images/extralarge.jpg 2x" alt="…"> |
1 2 3 4 5 6 |
<img sizes="(min-width: 40em) 80vw, 100vw" srcset="examples/images/medium.jpg 375w, examples/images/large.jpg 480w, examples/images/extralarge.jpg 768w" alt="…"> |
Nice selection of CSS loaders, in pure CSS and HTML. Many of the loaders can be tweaked within an online editor.
1 2 3 4 5 6 7 8 9 10 |
@mixin clearfix() { &:before, &:after { content: ""; display: table; } &:after { clear: both; } } |
1 2 3 |
.article { @include clearfix(); } |
Simple is king :)
Angular reaches BETA status. Time to start playing with it … Perfect for the holidays :)
With NativeScript und React Native you will be able to build native Android- und iOS-Apps as well.
Bourbon is one of the Sass Mixins libraries that always makes it into my projects :)
You will find Mixins for
Just a couple of links that deal with the usage or testing of structured data.
Structured data is not yet relevant for content rankings, but that might change in the future (Hangout).
„Structured data markup“ is a standard way to annotate your content so machines can understand and categorize it. Proper usage elevates the way data is displayed on Google Search, Facebook, Twitter, Pinterest and many others, when one of your content links is posted there.
Really looking forward to the JSON-LD integration :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "Product", "name": "Executive Anvil", "image": "http://www.example.com/anvil_executive.jpg", "description": "Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.", "mpn": "925872", "brand": { "@type": "Thing", "name": "ACME" }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.4", "reviewCount": "89" }, "offers": { "@type": "Offer", "priceCurrency": "USD", "price": "119.99", "priceValidUntil": "2020-11-05", "itemCondition": "http://schema.org/UsedCondition", "availability": "http://schema.org/InStock", "seller": { "@type": "Organization", "name": "Executive Objects" } } } </script> |
CSS Crush is a standards inspired CSS pre-processor that is written in PHP from scratch.
For a current project I am adding CSS Crush side by side to Sass. Lets see which of them sticks around in the end :) Might be keeping them both, as CSS Crush provides some nice options.