SpinThatShit is a set of SCSS mixins for single element loaders and spinners.
1 |
<div class="your-loader"></div> |
1 2 3 |
.your-loader { @include loader09($size: 10px, $height: 48px, $gap: 8px, $duration: 1s, $align: middle); } |
The Bellmaker is a library of device-agnostic and device-specific media queries that will complement your exisiting CSS.
1 2 3 4 5 6 7 8 9 |
.bellmaker_container { @media #{$da_baseline} { width: $pw_baseline;} @media #{$da_2x_small} { width: $pw_2x_small;} @media #{$da_x_small} { width: $pw_x_small;} @media #{$da_small} { width: $pw_small;} @media #{$da_medium} { width: $pw_medium;} @media #{$da_large} { width: $pw_large;} @media #{$da_x_large} { width: $pw_x_large;} } |
„Koala is a GUI application for Less, Sass, Compass and CoffeeScript compilation, to help web developers to use them more efficiently. Koala can run in windows, linux and mac.“
A Sass mixin for creating angled edges on sections by dynamically encoding SVGs.
1 |
@include angled-edge('outside bottom','lower right', #EE3924); |
Transformicons are animated symbols/buttons/icons that morph using a combination of SVG, CSS and HTML.
They also offer a builder to tweak the set.
1 2 3 4 5 6 |
transformicons.add('.tcon') // add default behavior for all elements with the class .tcon .remove('.tcon-menu--xcross') // remove default behavior for the first icon .add('.tcon-menu--xcross', { transform: "mouseover", revert: "mouseout" }); // add new behavior for the first icon |
Simple way to do some Visual Composer Grid cleanup, when you are using Bootstrap within your theme. This removes and cleans up classes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
add_filter('vc_shortcodes_css_class', function ($class_string, $tag) { $tags_to_clean = [ 'vc_row', 'vc_column', 'vc_row_inner', 'vc_column_inner' ]; if (in_array($tag, $tags_to_clean)) { $class_string = str_replace(' wpb_row', '', $class_string); $class_string = str_replace(' vc_row-fluid', '', $class_string); $class_string = str_replace(' vc_column_container', '', $class_string); $class_string = str_replace('wpb_column', '', $class_string); // replace vc_, but exclude any custom css // attached via vc_custom_XXX (negative lookahead) $class_string = preg_replace('/vc_(?!custom)/i', '', $class_string); // replace all vc_ // $class_string = preg_replace('/vc_/i', '', $class_string); } $class_string = preg_replace('|col-sm|', 'col-sm', $class_string); return $class_string; }, 10, 2); |
Visual Composer for WordPress
Bootstrap / Bootstrap Sass
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.
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 :)
Bourbon is one of the Sass Mixins libraries that always makes it into my projects :)
You will find Mixins for