1. A PRACTICAL EXAMPLE
Company/Organization that has multiple platforms of media that all
should/would/could look the same but likely have different code Basis and
functions
1. This Organization likely has 3+ “custom” style sheets that work for its specific
HTML markup and function…Which creates a maintenance nightmare.
2. The styling is incredibly rigid or hardcoded colors, sizes, backgrounds, etc.
How can Sass Remedy This?
2. A PRACTICAL EXAMPLE
1. The Various Style sheets that have specific tooling for its various usages –
aggregate them into a series of components that can be lumped into a set of
files.
• Example: in all four of the Platforms this ORG uses there is a table with a blue
background but various different takes on the certain parts of that table and filters
associated.
• Get all those identified and what classes they maybe using(or IDs but less desireable) and
begin to craft a few basic mixins that define rules to certain elements.
• Once that is established use those as you define the various aspects individually as the
specific style sheets were doing previously.
• ***This is not the end goal this is the start of the process ~ the end goal is the markup be
the same and “.blue-box-table” would mean the same for all various platforms.
3. A PRACTICAL EXAMPLE
2. To address any rigidity found in the existing style sheets identify all the
potential variables that would identify all levels of customization that could be
attained.
• A personal example of this for me would be the ORG I was working for had 100+
sites that were using a global style sheet along with their personal custom style
sheet.
• To address this I merged all the custom aspects into the global and broke them into
separate component based files.
• I then Identified all the flex points that each custom style sheet seemed to be trying to
attain.
• Set those to default variables in a variables file but the actual SCSS file that was
created for each of those sites had the capacity to simply override that defaulted
value.
• ***In the end 80% of those variables I had set up were vetoed by this particular ORG
4. SASS
&
SCSS
SASS
• No brackets or
semicolons, based on
indentation
• Less characters to
type
• Enforced
conventions/neatnes
s
SCSS
• Semi-colon and bracket
syntax
• Superset of normal CSS
• Normal CSS is also valid
SCSS
• Newer and
recommended
6. • Both of the previous examples compile to:
#main{
font-size: 12px;
color: #333333;
}
#main a{
color: #999999;
}
• Already demonstrated basic variable usage and
nesting
• Note: Some examples compile using different
formatting, I changed them for the slides for
readability
SASS/SCSS HAVE THE SAME FUNCTIONALITY
QuickStarter has created an outline to help you get started on your presentation. Some slides include information here in the notes to provide additional topics for you to research.
Summary:
In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form or representation, sometimes shortened or secret, for communication through a communication channel or storage in a storage medium. An early example is the invention of language which enabled a person, through speech, to communicate what he or she saw, heard, felt, or thought to others. But speech limits the range of communication to the distance a voice can carry, and limits the audience to those present when the speech is uttered. The invention of writing, which converted spoken language into visual symbols, extended the range of communication across space and time.