Front-end code bits
A collection of simple tips, directives, and opinions on front-end design best practice; primarily highlighting old-school vanilla code features that modern designers may have overlooked.
- Use pseudo-elements to expand hit areas on user interface controls.
- Implement Dark Mode with Custom Properties and the
prefers-color-scheme Media Feature.
- Filter colour all the way down with
currentColor, the original CSS variable.
- Establish base unit and tint variables to influence harmony in layout and colour.
- Control and style state semantically with ARIA attributes.