Module: Stylish::Generate::ElementMethods
- Included in:
- Description
- Defined in:
- lib/stylish/generate.rb
Overview
Often the selector associated with a call to the rule method would simply be a single HTML element name. This has been factored out by adding methods to the Description DSL class corresponding to all the HTML elements. Consider the following (contrived) example.
Stylish.generate do
body do
div do
a :font_weight => bold
end
end
end
Which would then serialise to the following:
body div a {font-weight:bold;}