HTML and CSS Reference
In-Depth Information
font-family: FolkSolidRegular, sans-serif;
text-transform: uppercase;
color: #E4773A;
text-shadow: 3px 3px 1px #C84134,
4px 4px 1px #C84134;
letter-spacing: 2px;
Writing valid stylesheets
When we went through that, you might have noticed that the styles have no typos
whatsoever. The kind copy editors have no doubt done a wonderful job, but I realize
you have no such assistants when you write your stylesheets! An errant typo could
cause us untold trauma as we hunt why a particular style does not get applied. This
is why it is important to also automate validation of your styles and use autocomple-
tion to automate as much of your style declarations as possible.
Sublime Text and Vim both have autocompletion of CSS properties available, and
you can automate the insertion of the semicolon at the end too! If you have no ac-
cess to these tools, you can use the online CSS validator at
validator/ to test your CSS.
There is another way to automate writing valid and productive style rules—by using
an alternative style language that compiles into CSS. We shall be looking into some
of these languages next.
Style languages to write productive stylesheets
For a very long time, the only way to write stylesheets was to use the syntax that
W3C provided for within the specifications that it produced. However, there are a
lot of productivity benefits to be gained by using some programming logic to write
stylesheets. But browsers could only understand syntaxes that are mandated by the
W3C specifications. This means, any style language that uses additional program-
mable features should be converted to a browser-understandable typical stylesheet
(this is called compilation).
Search WWH ::

Custom Search