
👋 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 have learned a new term today in terms of light mode – dark mode in user interfaces: contrast polarity. Basically, a positive contrast polarity is a light text on a dark surface (light mode) — just like the physical black ink on white paper. Negative contrast polarity, on the other hand, is the reverse — dark text on a light surface (dark mode).
Now, where else can you use this term? In CSS class-naming, of course!
See the Pen Contrast polarity (light – dark mode) by Brian Dys Sahagun (@briandys) on CodePen.
On the concept of “absolutes”: If a color is the same as CSS named colors, name it as is or use the name itself:
--color-red: #ff0000;
If you “invented” a color or base it on an existing brand color, “invent” a name for it, but always attach the name of the basic color:
--color-coagulated-red: #c93434;
--color-facebook-blue: #4267b2;
On the concept of “generics”: Use these colors as basis for primaries, secondaries, accents, etc.:
--primary-color: var(--color-facebook-blue);
On the concept of “specifics”: Use the “generics” to identify colors of UI elements:
.submit-button { background-color: var(--primary-color) };
I saw what you did there. The padding between form fields is 24 pixels. Please remove 8 pixels from that gap. Make sure to use the components provided.
Chief of Pixel Police
Well… yeah… it’s your fault. Components are ready-built — why can’t you just use it with all its pre-built goodnes. Why take matters into your own hands and decide 24 pixels here and 32 pixels there. Don’t ever do that next time. If you do, make sure to just move 1 pixel at a time to avoid detection. My brain whispered to me.
Can sarcasm be used for fun? Sure can! Actually, I don’t have any beef in using components, no matter how they scream for adjustments. But, hey, we are designers. We design — that’s what we do. We take, we break, and make it new again, in a different light. Better, I hope.
And this post is really about answering the question, “Can I really design in my browser?” Because I was thinking of using Figma in creating the visual design of the warning “Beware the Pixel Police”. But Figma also uses CSS, so I thought I’d just go straight up using CSS.
You may check out the HTML and CSS in CodePen:
A target area in a website or app is an area that enables a user to interact with the interface through touch or a pointing device such as a mouse.
Examples are links, buttons, form elements, etc.
According to Fitts’s law, “the time required to rapidly move to a target area is a function of the ratio between the distance to the target and the width of the target”.
For a target area to be easily tapped or clicked by the user, its area must be adequate enough to be interacted upon.
Visually, it may appear small (such as an icon), however, it could still have an adequate target area.
See the Pen The Design of Target Areas by Brian Dys (@briandys) on CodePen.
Styling in CSS is always dependent on the structure of HTML. If you have control over the structure of HTML, plan to redesign it also.
A good rule of thumb is to first, set up a system.
You could notice that this system is designed to build on top of the previous one. Meaning usability and accessibility come first before visual design. The same goes for the considerations under visual design.