Skip to content

Commit

Permalink
Update _reset.scss
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Jul 15, 2024
1 parent 5e72b10 commit 1bb24e3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/scss/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@
// Base | Reset
// ============================================================================

// Reset margin and padding for all elements
@mixin reset_bleed {
margin: 0;
margin-block-start: 0;
margin-block-end: 0;
margin-inline-start: 0;
margin-inline-end: 0;
padding: 0;
border: 0; // Ensures no borders are applied unless explicitly defined
font-size: 100%; // Prevent scaling issues by setting default font size
font: inherit; // Ensures fonts are consistently inherited from parent elements
vertical-align: baseline; // Aligns elements to the baseline to avoid layout shifts
}



// Apply the reset mixin to all elements
*,
a,
abbr,
Expand Down Expand Up @@ -153,6 +161,12 @@ wbr
@include reset_bleed;
}

// HTML5 display-role reset for older browsers
// Ensures HTML5 elements are displayed correctly in older browsers
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, main {
display: block;
}

// html, body, div, span, applet, object, iframe,
// h1, h2, h3, h4, h5, h6, p, blockquote, pre,
Expand Down

0 comments on commit 1bb24e3

Please sign in to comment.