👋 Oi, mga repapips, Brian Dys here! I love music, photography, and creative stuff like UX design and art. This is a place where I collect my thoughts and works. Apart all these, I’m Jaycelle’s better half and Bryce’s dad. 🥰
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.
Does the HTML markup of your website has an accessibility function in the form of “Skip to Content”? If yes, then you would notice that it is located at the topmost of the markup. This is as such in order to make it the first focus when using keyboard to navigate.
Now you may ask, “Shouldn’t the document title be at the topmost of the document?”
Not when you put this accessibility function into the context of its intended use. The user, upon arriving at your website might have come from a link or have typed a URL into the web browser. That could’ve served the purpose of document title that ensures the user where they are going to or arriving at.
The second part of this context is the user being able to go directly to the content — skipping every element that isn’t part of their purpose for visiting the website.
Imagine this ombre cake:
It looks yummy and it has layers.
It is similar with active elements – they must have three levels for the purpose of CSS.
The first level is the textual element itself. The second level holds the function of the active element (e.g., <a> or <button>). The third level is for positioning. Initially, it appears that the default way to put it is this way:
And since this is for the purpose of CSS, we must implement Framing for the textual element and for positioning. These frames will act as hooks for CSS. Look at this example:
<div> <!– Frame for positioning –>
<span> <!– Frame for textual element –>
Here’s a demo to show a floated button:
Oh and by the way, here’s an ombre potato:
As front-end designers, we are using patterns over and over again – we are employing specific techniques to answer specific needs. But what we lack is a term, a name tag for those methods.
It’s simply like the Flying V of The Mighty Ducks!
So far, I’ve added Padding and Framing to my vocabulary.
Let’s try another one. Say for example, I need the following for my website’s header:
- Fixed-height header
- Responsive width
- The content of the header are all vertically-aligned in the middle
- If the content of the header exceeds the fixed height, then it will respond
What kind of solution does this need and what can we name the technique?
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:
- Level 1: Default (browser level)
- Level 2: Normalize (boilerplate level)
- Level 3: Modify (visibility and sizes level)
- Level 4: Template (functionality level)
- Level 5: Theme (custom level)
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.
Level 3: Modify
- hide accessible names
- hide components
- set default state of components thru class names
- active element padding
- spacings (margins between components and paddings around components)
- dimensions are set at 100% for Mobile-First
Level 4: Template
- set the functionality of utilities such as Search and Navigation
Level 4: Theme
- background colors/images
- visual elements (badges, logos, lines/borders, shadows, corner radius)
I’m currently working on HopScotch 3 and it involves a lot of revising the HTML markup of content structure plus a lot of structural class names.
In relation to this HTML refactoring, I’d like to share with you some notes on writing the HTML markup of web sites:
- Text. Begin by writing in plain text all the important content your web site has. For example, you might have a web site logo – translate it into words; if you web site has a tagline or description, write that too.
- Tag. Follow it up by wrapping each text content in its semantic HTML tag. Avoid using
spanjust yet. For example, your web site name should be wrapped in a heading tag like
h1since it is the title of your HTML document; your tagline could be wrapped in a
ptag. At this point, all heading tags could be in
h1since we have not put these objects in context yet. Eventually, we would be arranging the hierarchy of these tags – from
- Group. This is where div and span will come into play. You will have to group and segment the objects based on semantics and not on visual appearance. For example, you could wrap both the web site name and tagline in one
- Classify. Put the class names into the grouped structure of the objects. For example, the
divthat contains the web site name and tagline could be classified as “web-product-name”. The test for its semantics is if the name is true to the objects’ nature – something that isn’t tied up to visual appearance or layout.
- Format. To add another level of semantics and structure to the objects, we could use Microformats. It uses a vocabulary of class names that give structure to common content such as a person’s information, a movie’s information, an organization’s information and much more.