Module: ItsSwiss

Defined in:
lib/its_swiss.rb,
lib/its_swiss/engine.rb,
lib/its_swiss/version.rb,
lib/its_swiss/form_builder.rb,
app/helpers/its_swiss/application_helper.rb,
app/controllers/its_swiss/specimen_controller.rb,
lib/generators/its_swiss/install/install_generator.rb

Defined Under Namespace

Modules: ApplicationHelper, Generators Classes: Configuration, Engine, FormBuilder, SpecimenController

Constant Summary collapse

STYLESHEETS =

The stylesheets, in the order their layers are declared. The gem's own layer order is fixed here rather than left to whoever writes the tags: an application that loads type before tokens should still get the cascade the library was designed with.

Every file states its own layer, so linking these six individually and linking the single its-swiss.css that imports them resolve identically.

%w[ tokens reset type grid components transitions ].freeze
LAYER =

The cascade layer everything the gem ships lives in. An application's own CSS is unlayered, and unlayered rules beat every layered one regardless of specificity — which is the boundary in the table made mechanical: the gem is a base, and the app's grid and domain components win without anyone having to count selectors or reach for !important.

"its-swiss".freeze
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.configObject



33
34
35
# File 'lib/its_swiss.rb', line 33

def config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Where a consumer says which of the gem's slots it fills. Nothing here has a default the gem could reasonably pick for it.

Yields:



29
30
31
# File 'lib/its_swiss.rb', line 29

def configure
  yield config
end