ICT role in 21st century education and it's challenges.
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
1. SasstronautsAdvanced Sass Usage, Plugins, Mixins, Tips, Tricks
Atlanta Drupal User’s Group - April 2015
Eric Scott Sembrat - Georgia Institute of Technology
12. Eric Sembrat
Web Manager - College of Engineering - Georgia Tech
Graduate Student - Learning Technologies - Georgia State
Nerd Extraordinaire
13. Eric Sembrat
Web Manager - College of Engineering - Georgia Tech
Graduate Student - Learning Technologies - Georgia State
Nerd Extraordinaire
@esembrat
Tweet at me, bro.
14. Eric Sembrat
Web Manager - College of Engineering - Georgia Tech
Graduate Student - Learning Technologies - Georgia State
Nerd Extraordinaire
http://www.ericembrat.com
Learn more!
@esembrat
Tweet at me, bro.
23. Release Details3.3
Data structures, ahoy!
Sass Maps
Giving power to browsers.
CSS Source Maps
SMACSS, BEM, OOCSS.
Suffix Class Support
Squashing those issues.
Bug Fixes
25. For preprocessors that support CSS source maps (like Sass), DevTools
lets you live-edit your preprocessor source files in the Sources
panel, and view the results without having to leave DevTools or
refresh the page. When you inspect an element whose styles are
provided by a generated CSS file, the Elements panel displays a
link to the original source file, not the generated .css file.
29. You have a function to do anything you
want; whether it be appending a
selector to another selector, nesting
a selector under another selector,
replacing a selector within another
selector, unifying selectors, and
more.
selector-append()
selector-nest()
selector-extend()
selector-replace()
selector-unify()
selector-parse()
is-superselector()
simple-selectors()
“
34. Initiative to port Sass to a more flexible platform.
Mostly compatible with Ruby Sass today, with a few quirks and missing features.
3.0
3.1
3.2
3.3
3.4
Most basic Sass implementations & functions.
All basic specs match Ruby Sass 3.4.
All the edge case fixes.
Locating those last little issues.
Full library compatibility. Compass, here we come!
35. Initiative to port Sass to a more flexible platform.
Mostly compatible with Ruby Sass today, with a few quirks and missing features.
3.0
3.1
3.2
3.3
3.4
Most basic Sass implementations & functions.
All basic specs match Ruby Sass 3.4.
All the edge case fixes.
Locating those last little issues.
Full library compatibility. Compass, here we come!
49. 3 CSS Organizational Architectures
SMACSS
Stands for the Scalable and
Modular Architecture for CSS.
“SMACSS is a way to
examine your design
process and as a way
to fit those rigid
frameworks into a
flexible thought
process.”
OOCSS
Object-Oriented CSS
“… An approach for
writing CSS that’s fast,
maintainable, and
standards-based. It
adds much needed
predictability to CSS.”
Block, Element, Modifier.
“…A set of front-end
development techniques
and tools, that allow us
to build websites quickly
and maintain them over
a long time.”
BEM
59. SMACSS
Stands for the Scalable and
Modular Architecture for CSS.
“SMACSS is a way to
examine your design
process and as a way
to fit those rigid
frameworks into a
flexible thought
process.”
SMACSS in Sass
60.
61.
62. 5 Categorizations of CSS Rules
Base: Your single element selectors.
Layout: A section of your page (footer).
Module: A reusable part of your page (callouts, sidebar).
State: Statuses for modules, layouts (mobile, active).
Theme: Responsible for the look-and-feel.
69. OOCSS in Sass
OOCSS
Object-Oriented CSS
“… An approach for
writing CSS that’s fast,
maintainable, and
standards-based. It
adds much needed
predictability to CSS.”
70. 2 Principles of OOCSS
Separate structure and skin.
Separate container and content.
71. Separate structure and skin.
Define repeating visual features as separate “skins” that you
can mix-and-match with your various objects to achieve a large
amount of visual variety without much code.
@mixin and @include to the rescue!
72. Separate container and content.
An object should look the same no matter where you put it.
77. Sass-Globbing: The Partial Whisperer
Adds the ability for Sass to have wildcard
partial importing from a directory.
Like CSS, importing follows an
alphanumerical ordering.
https://github.com/chriseppstein/sass-globbing
78. Breakpoint: Simple Media Queries
Demystifies and simplifies the process of
building media queries by allowing them
to be embedded into your Sass.
https://github.com/at-import/breakpoint
1. Define your media query:
$gt-width-tablet: 816px;
$query-tablet: (max-width $gt-width-tablet);
2. Use your media query:
.node .field-body {
float: left;
font-size: 12pt;
@include breakpoint($query-tablet){
float: none;
font-size: 20pt;
}
}
79. Breakpoint: Simple Media Queries
Demystifies and simplifies the process of
building media queries by allowing them
to be embedded into your Sass.
https://github.com/at-import/breakpoint
1. Define your media query:
$gt-width-tablet: 816px;
$query-tablet: (max-width $gt-width-tablet);
2. Use your media query:
.node .field-body {
float: left;
font-size: 12pt;
@include breakpoint($query-tablet){
float: none;
font-size: 20pt;
}
}
80. BEM Constructor: Speed up BEM!
Provides an easy avenue for defining,
extending, and standardizing BEM
formatting in a Sass project!
https://github.com/danielguillan/bem-constructor
“If constructing objects programmatically seems too verbose or abstract to
you that's perfectly OK. This tool is not for everybody.”
“However if you need to enforce a strict way of writing BEM objects in
your project, want to make sure they won't mutate and thus produce
more secure CSS, then this tool might help you.”
81. All of the Grids: Foundational Layouts!
Bootstrap, susy, Neat, singularity, and more!
82. All of the Grids: Foundational Layouts!
Bootstrap, susy, Neat, singularity, and more!
83. Compass: Too Big to Fail
Large plugin for Sass to provide typography,
CSS3, and Sass-helper utilities.
http://compass-style.org/
84. Bourbon: A Nice Cold Glass of CSS3
Compares as a lite version of Compass.
Bourbon handles CSS3, a few golden utilities
like a champ.
http://bourbon.io/
102. @mixin colourText($colour: #aaa, $textShadow…) {
color: $colour;
@if lightness($colour) < 50% {
@include text-shadow($textShadow);
}
@else {
@include text-shadow($textShadow);
}
}
Data list can be used for arguments.
109. The next episode…4.0
1. Reject invalid function names.
2. Unitless/Unitful value comparison.
3. Allow auto ‘index’ file import from
folder.
4. One-time import library files.
https://github.com/sass/sass/milestones/4.0
110. The next episode…4.0
1. Reject invalid function names.
2. Unitless/Unitful value comparison.
3. Allow auto ‘index’ file import from
folder.
4. One-time import library files.
https://github.com/sass/sass/milestones/4.0
Let’s see what Camp Sass brings!