Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

CSS Reset & Utility Styles

Overview

This CSS reset file provides a baseline for consistent styling across different browsers. It normalizes default styles, applies global custom properties, and introduces some utility classes to simplify styling.

Features & Options

1. Global Reset

  • Removes default margins and paddings.
  • Sets box-sizing: border-box for predictable element sizing.

2. Root Variables

Defines custom properties for easy theme management:

  • --font-family: Space Mono (monospace font from Google Fonts)
  • --font-size: Base font size (1.2rem)
  • --line-height: Line height for consistent spacing (1.5)
  • --color-text: Default text color (#ffffff)
  • --color-background: Default background color (#0c0c0c)
  • --color-link & --color-link-hover: Link colors
  • --color-brand-one, --color-brand-two, --color-brand-three: Custom brand colors
  • --spacing: Default spacing unit (1rem)
  • scroll-behavior: smooth: Enables smooth scrolling

3. Typography & Layout

  • Normalizes heading sizes while maintaining readability.
  • Sets up a balanced text-wrap behavior for better text formatting.
  • Adjusts font smoothing for better rendering on macOS and Windows.

4. Media & Elements

  • Resets common elements (images, videos, SVGs) to be responsive.
  • Ensures consistent form elements styling.
  • Removes default button styles and provides a cursor: pointer.

5. Utility Classes

  • .flex: Applies display: flex.
  • .flex-column: Applies flex-direction: column.
  • .flex-center: Centers items using justify-content and align-items.
  • .color-brand-one, .color-brand-two, .color-brand-three: Applies predefined brand colors.
  • .container: Sets a max width (1440px) and applies padding.

6. Accessibility Enhancements

  • outline styles for better keyboard navigation.
  • Prevents text-size-adjust issues on mobile devices.

Usage

To use this CSS reset, simply include it in your project:

<link rel="stylesheet" href="reset.css">

or import it in your CSS file:

@import url("reset.css");

License

This project is licensed under the MIT License. See the full license below:

MIT License

Copyright (c) 2025 Tyrone May

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages