
Hi, I’m Brian Dys — a photographer from the inside looking out · a composer entangled in electronic music · a UX designer · a spouse, a parent, & everything in between.
I am currently making a curriculum for the basics of HTML and CSS.
Revisiting CSS Levels, I have written in the past about it:
The important thing to remember is to pattern it after the Levels of HTML wherein we must begin with Accessibility and Usability in mind.
And from there on, we build towards Visual Design.
Using this as basis, one could argue that Colors and Typography are “nice-to-haves”.
Can your design stand in black and white?
Can your design stand in a serif font?
Yes, it should.
After building the Content Structure (HTML) of your website, the next step in the process is building its Visuals (CSS).
To be able to ease the process of writing the style sheets, we must segment it into levels:
Ideally, each level must be buildt on top of the previous one yet still independent. For example, leaving the style sheet at browser level must present usable information. The same principle applies as one builds the style sheet level per level.
Here’s a simple yet effective activity we have here at Voyager – stand-up meetings.
Our team has officially joined Voyager Innovations!
Voyager Innovations, Inc. is part of First Pacific and is a wholly owned subsidiary of Smart Communications, Inc. (Smart) focused on delivering disruptive innovations for the rapidly changing world.
In today’s world, the products we sell, how we do things, the way we are structured, the networks, systems and platforms that support us are all changing and evolving. Voyager Innovations, Inc. is the strategic response to the changing needs of the communities. We are an organization that is positioned for the future new business streams & evolving business models.
Previously, I’ve discussed a class naming convention in the form of:
<generic>__<identifier>–<specific>
In this manner we are using a UI State class located up in the DOM tree – particularly in the body
to manipulate different UI elements under it.
Take this as an example: in a site’s header, both the main navigation and search form are located.
<header>
<h2 class="accessible-name">Header Content</h2>
<nav class="main-navigation">…</nav>
<form class="search-form">…</form>
</header>
How would you be able to affect the main navigation depending on the state of the search form if its class is only confined within its container? The answer might be “thru JavaScript” – undeniably, we would need JS in this topic but only for manipulating class names. The trick lies in putting the UI Type or UI State class in a place wherein both main navigation and search form are under it.
What benefit do we get in having a global class
located higher in the DOM tree? It lets us control different parts of the UI depending on the site’s or app’s UI Type or UI State.
It is important to reserve the highest element you can put a class on – which is html
(for pertinent class names), thus, the second highest element we could attach a class
attribute to is body
.
Going back to our example, we would use the following UI State class to define the state of the search form:
<body class="ui-state__search-form–active">
The body class
, in words, translates to “The UI State of the Search Form is Active”.
Now, whenever the search form is active, you can already manipulate the main navigation based on that state.
Take a look at the demo on CodePen:
See the Pen Using <body> to Define UI States and Types by Brian Dys Sahagun (@briandys) on CodePen.