Package Exports
- browserux.css
- browserux.css/browserux.css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browserux.css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
EN | FR

browserux.css
browserux.css
is a minimal CSS foundation focused on user experience and accessibility.
Designed to enhance native HTML and CSS behaviors, it provides a clean, modern baseline that improves usability across all devices, before relying on utility classes, heavy frameworks, or JavaScript.
π Table of Contents
- β Why
browserux.css
- π§ Philosophy
- 𧬠File Structure
- β¨ Features
- π How to Use
- π Browser Support
- π€ Contributing to the Project
- π Credits
- βοΈ License
β Why browserux.css
Most front-end projects start with a reset.css
or normalize.css
. However, despite their intentions, especially Normalizeβs goal to preserve useful browser behaviors, we almost always end up adding our own tweaks: removing margins, setting box-sizing: border-box
, improving typography, etc.
But the web has evolved. User experience has become a key concern, and modern browsers now offer native CSS capabilities that are often underused: customizable scrollbars, keyboard focus management, support for user preferences like dark mode or reduced motionβ¦
browserux.css
goes beyond a simple reset. It provides a modern, lightweight foundation designed to improve usability, accessibility, and visual consistency of native browser elements, without JavaScript, without utility classes, and without bloat.
π§ Philosophy
π Goals
- Provide a complete and lightweight base CSS file, designed from the ground up to enhance user experience and accessibility.
- Offer a modern alternative to traditional base files (reset.css, normalize.css, etc.).
π Guiding Principles
- Use only native HTML elements, without relying on utility classes.
- Built around four core pillars:
- π Reset.
- βοΈ Normalization.
- π§© Usability.
- βΏ Accessibility.
𧬠File Structure
browserux.css
is organized into four logical sections to ensure clarity, scalability, and maintainability:
π£ 1. Variables
Using CSS variables ensures a consistent design system and allows for easy theme customization (light/dark mode, color adjustments, etc.). All foundational values are defined here:
- π¨ Global colors
- β Colors for form validation elements
- β³ Progress bar colors
- ποΈ Text selection
- π±οΈ Scrollbar
- π€ Typography
βοΈ 2. User Preferences
Handles user-specific preferences detected via media queries:
- π Theme preferences.
- ποΈ Animation preferences.
π§© 3. Browser Interface Theme
Applies visual customization to native browser elements:
- ποΈ Text selection.
- π±οΈ Scrollbar.
- π Form components.
- π½ Collapsible interactive components.
- π― Keyboard focus accessibility.
π§± 4. Browser Default Styles
A balanced integration of the four core principles, organized logically:
- π§ Spacing reset
- π¦ Box model
- π§± HTML root element
- π Sections
- ποΈ Content grouping
- βοΈ Text-level semantics
- πΌοΈ Embedded content
- π Tabular data
- π§Ύ Forms
- π½ Interactive elements
β¨ Features
browserux.css
is a modern, lightweight, and 100% native (pure HTML/CSS) base stylesheet, designed to meet the needs of todayβs front-end projects. It covers the essential foundations to ensure consistency, accessibility, and usability, from the very first byte.
π Reset
browserux.css
applies a minimalist reset to remove unwanted default browser styles while preserving useful behaviors.
- Universal spacing reset (margin/padding set to 0).
- Box model reset to
border-box
. - Removal of list styles and table indentations.
- Neutralization of default button and form field styles.
- Media elements made responsive.
- Cleansing of default focus outlines in Firefox.
- Neutralized browser field validation styles.
βοΈ Normalization
Standardizes elements across browsers to ensure consistent behavior.
- Unified base typography (size, font, line height).
- Standardized typographic behaviors (
b
,small
,sub
,sup
). - Harmonized appearance of form fields.
- Consistent rendering of lists and tables.
- Improved responsiveness of media content.
- Consistent scrollbar behavior.
π§© Usability
Enhances the fluidity of UX interactions and reduces friction across all device types.
- Smooth scrolling (unless disabled by user preferences).
- Optimized tap handling on mobile (
touch-action: manipulation
). - Prevents media content from overflowing its container.
- Disables unwanted text selection on interactive elements.
- Forces scrollbar visibility to avoid layout shifts.
- Improved cursor styles for interactive elements.
βΏ Accessibility
Ensures the site remains usable for all users, including those relying on assistive technologies.
- Respects system preferences: dark mode and reduced motion.
- Visible keyboard focus outlines using
:focus-visible
. - Support for
accent-color
on form fields. - Help cursor on elements with additional information (
abbr
,dfn
). - Neutral validation styles (especially in Firefox).
- Visible and customizable scrollbars, without hiding them using CSS hacks.
π How to Use
Whether you're building a static site or a modern front-end project, browserux.css
integrates easily into any workflow.
Here are three simple ways to add it to your project:
π Use the CDN
You can include the latest version directly via jsDelivr:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Effeilo/browserux.css/browserux.css">
πΎ Download and Host Locally
You can also download the following file:
browserux.css
.
Then include them locally in your project:
<link rel="stylesheet" href="/path/to/browserux.css">
π¦ Use via npm
You can also install browserux.css
via npm for better integration with modern workflows (Vite, Webpack, Parcel, etc.):
npm install browserux.css
After installation, you can import the CSS file into your project:
Direct link from node_modules/
(in your HTML)
<link rel="stylesheet" href="./node_modules/browserux.css/browserux.css">
Import it directly in your JavaScript (Vite, Webpack, Parcel)
If your build tool supports CSS imports (like Vite, Webpack, etc.), you can directly import the CSS file into your JavaScript entry point:
import 'browserux.css/browserux.css';
π Browser Support
- π Chrome (latest versions)
- π¦ Firefox (latest versions)
- π§ Safari 13+
- π Edge Chromium
- π€π Modern Android browsers
- π±π§ Safari on iOS 13+
β‘ No support for legacy browsers like IE11. A progressive enhancement approach ensures graceful and functional degradation.
π€ Contributing to the Project
Contributions are welcome! Whether you want to report a bug, suggest an improvement, add a feature, or fix a typo, feel free to get involved.
π οΈ Issues & Feedback
- Open an issue to:
- Report a bug.
- Suggest an improvement or new feature.
- Discuss an idea before submitting a PR.
- Any feedback is appreciated, even non-technical!
π How to Contribute
- Fork this repository.
- Create a new branch (
git checkout -b my-suggestion
). - Make your changes.
- Commit your changes (
git commit -m 'Add: my-suggestion'
). - Push the branch (
git push origin my-suggestion
). - Open a Pull Request.
β Best Practices
- Stay true to the project's minimalist, accessible, and native-first approach.
- Comment your code to make reviews easier.
- Focus on clear, targeted, and well-documented changes.
- Test your changes in the latest versions of modern browsers before submitting a PR.
π Credits
Inspired by great practices from:
- Modern Normalize
- Paul Irish's box-sizing border-box method
- CSS Tricks Articles
- WebAIM Accessibility Guidelines
βοΈ License
MIT License, Free to use, modify, and distribute.