Skip to content

Commit

Permalink
feat: Update to v8 of normalize.css
Browse files Browse the repository at this point in the history
Fixes #133
  • Loading branch information
JohnAlbin committed Nov 11, 2023
1 parent 42f4d39 commit c51fba5
Show file tree
Hide file tree
Showing 17 changed files with 288 additions and 1,377 deletions.
37 changes: 14 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## Latest versions

For use with… | normalize-scss version
-----------------------------|-----------------------
Sass 3.4 or libSass | [8.0.0](https://github.com/JohnAlbin/normalize-scss/releases/tag/8.0.0)<br> combining normalize.css v7.0.0 with v1.1.3
Compass or Bower | [7.0.0](https://github.com/JohnAlbin/normalize-scss/releases/tag/7.0.0)<br> combining normalize.css v7.0.0 with v1.1.3 (last version with Compass and Bower support)
Ruby Sass 3.3 | [3.0.3](https://github.com/JohnAlbin/normalize-scss/releases/tag/3.0.3)<br> combining normalize.css v3.0.3 with v1.1.3
Ruby Sass 3.2 | [2.2.0+normalize.2.1.3](https://github.com/JohnAlbin/normalize-scss/releases/tag/2.2.0%2Bnormalize.2.1.3)<br> combining normalize.css v2.1.3 with v1.1.3
| For use with… | normalize-scss version |
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| The latest Sass | [8.0.0](https://github.com/JohnAlbin/normalize-scss/releases/tag/8.0.0)<br> combining normalize.css v8.0.0 with v1.1.3 |
| Compass or Bower | [7.0.1](https://github.com/JohnAlbin/normalize-scss/releases/tag/7.0.1)<br> combining normalize.css v7.0.0 with v1.1.3 (last version with Compass and Bower support) |
| Ruby Sass 3.3 | [3.0.3](https://github.com/JohnAlbin/normalize-scss/releases/tag/3.0.3)<br> combining normalize.css v3.0.3 with v1.1.3 |
| Ruby Sass 3.2 | [2.2.0+normalize.2.1.3](https://github.com/JohnAlbin/normalize-scss/releases/tag/2.2.0%2Bnormalize.2.1.3)<br> combining normalize.css v2.1.3 with v1.1.3 |

## The Sass port of normalize.css

Expand All @@ -18,7 +18,7 @@ This Sass port currently adds:
* Vertical rhythm mixins: Allowing you to alter the font-size, line-height and margins in Normalize’s output without hacking the library.
* A ready-to-fork version.

# normalize.css v5
# normalize.css v8

> A modern alternative to CSS resets
Expand Down Expand Up @@ -68,13 +68,12 @@ Alternatively, you can import normalize-scss immediately into your main Sass fil

## Browser support

* Chrome (last four)
* Edge (version 25 and later)
* Firefox (last four)
* Firefox ESR
* Internet Explorer 9+
* Opera (last four)
* Safari (last four)
* Chrome
* Edge
* Firefox ESR+
* Internet Explorer 10+
* Safari 8+
* Opera


## Extended details and known issues
Expand All @@ -92,13 +91,6 @@ intentional. [Source](https://en.wikipedia.org/wiki/User:Davidgothberg/Test59).
Normally, using `sub` or `sup` affects the line-box height of text in all
browsers. [Source](https://gist.github.com/413930).

#### `svg:not(:root)`

Adding `overflow: hidden` fixes IE9's SVG rendering. Earlier versions of IE
don't support SVG, so we can safely use the `:not()` and `:root` selectors that
modern browsers use in the default UA stylesheets to apply this style.
[Source](https://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0339.html).

#### `select`

By default, Chrome on OS X and Safari on OS X allow very limited styling of
Expand All @@ -123,8 +115,7 @@ Chrome and Safari on Windows you can't control `border` properly. It will apply
`border-width` but will only show a border color (which cannot be controlled)
for the outer 1px of that border. Applying `-webkit-appearance: textfield`
addresses these issues without removing the benefits of search inputs (e.g.
showing past searches). Safari (but not Chrome) will clip the cancel button on
when it has padding (and `textfield` appearance).
showing past searches).

## Contributing

Expand Down
151 changes: 25 additions & 126 deletions fork-version/_normalize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/

html {
Expand All @@ -45,31 +44,25 @@ html {
@else {
line-height: 1.15; /* 1 */
}
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
========================================================================== */

/**
* Remove the margin in all browsers (opinionated).
* Remove the margin in all browsers.
*/

body {
margin: 0;
}

/**
* Add the correct display in IE 9-.
* Render the `main` element consistently in IE.
*/

article,
aside,
footer,
header,
nav,
section {
main {
display: block;
}

Expand Down Expand Up @@ -163,28 +156,10 @@ h1 {
ul {
padding: 0 0 0 $indent-amount;
}
}

/**
* Add the correct display in IE 9-.
*/

figcaption,
figure {
display: block;
}

/**
* Add the correct margin in IE 8.
*/

figure {
@if $normalize-vertical-rhythm {
figure {
@include normalize-margin(1 $indent-amount);
}
@else {
margin: 1em $indent-amount;
}
}

/**
Expand Down Expand Up @@ -235,20 +210,18 @@ pre {
========================================================================== */

/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
* Remove the gray background on active links in IE 10.
*/

a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
background-color: transparent;
}

/* Text-level semantics
========================================================================== */

/**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/

Expand All @@ -258,15 +231,6 @@ abbr[title] {
text-decoration: underline dotted; /* 2 */
}

/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/

b,
strong {
font-weight: inherit;
}

/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
Expand All @@ -282,23 +246,6 @@ samp {
@extend %monospace;
}

/**
* Add the correct font style in Android 4.3-.
*/

dfn {
font-style: italic;
}

/**
* Add the correct background and color in IE 9-.
*/

mark {
background-color: #ff0;
color: #000;
}

/**
* Add the correct font size in all browsers.
*/
Expand Down Expand Up @@ -332,39 +279,13 @@ sup {
========================================================================== */

/**
* Add the correct display in IE 9-.
*/

audio,
video {
display: inline-block;
}

/**
* Add the correct display in iOS 4-7.
*/

audio:not([controls]) {
display: none;
height: 0;
}

/**
* Remove the border on images inside links in IE 10-.
* Remove the border on images inside links in IE 10.
*/

img {
border-style: none;
}

/**
* Hide the overflow in IE.
*/

svg:not(:root) {
overflow: hidden;
}

/* Forms
========================================================================== */

Expand Down Expand Up @@ -398,7 +319,7 @@ svg:not(:root) {
*/

/**
* 1. Change the font styles in all browsers (opinionated).
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/

Expand All @@ -413,7 +334,7 @@ textarea {
@else {
line-height: 1.15; /* 1 */
}
font-family: if($base-font-family, $base-font-family, sans-serif); /* 1 */
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
margin: 0; /* 2 */
}
Expand All @@ -437,16 +358,14 @@ select { /* 1 */
}

/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
* Correct the inability to style clickable types in iOS and Safari.
*/

button,
html [type="button"], /* 1 */
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
-webkit-appearance: button;
}

button,
Expand Down Expand Up @@ -481,8 +400,8 @@ input {
}

/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/

[type="checkbox"],
Expand Down Expand Up @@ -510,10 +429,9 @@ input {
outline-offset: -2px; /* 2 */

/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
* Remove the inner padding in Chrome and Safari on macOS.
*/

&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
-webkit-appearance: none;
}
Expand Down Expand Up @@ -554,17 +472,15 @@ legend {
}

/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/

progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
vertical-align: baseline;
}

/**
* Remove the default vertical scrollbar in IE.
* Remove the default vertical scrollbar in IE 10+.
*/

textarea {
Expand All @@ -575,7 +491,7 @@ textarea {
========================================================================== */

/*
* Add the correct display in Edge, IE, and Firefox.
* Add the correct display in Edge, IE 10+, and Firefox.
*/

details {
Expand All @@ -591,14 +507,8 @@ summary {
}


/*
* Add the correct display in IE 9-.
*/

menu {
display: block;

@if $normalize-vertical-rhythm {
@if $normalize-vertical-rhythm {
menu {
/*
* 1. Set 1 unit of vertical rhythm on the top and bottom margin.
* 2. Set consistent space for the list style image.
Expand All @@ -619,17 +529,9 @@ menu {
}
}

/* Scripting
/* Misc
========================================================================== */

/**
* Add the correct display in IE 9-.
*/

canvas {
display: inline-block;
}

/**
* Add the correct display in IE.
*/
Expand All @@ -638,11 +540,8 @@ template {
display: none;
}

/* Hidden
========================================================================== */

/**
* Add the correct display in IE 10-.
* Add the correct display in IE 10.
*/

[hidden] {
Expand Down
Loading

0 comments on commit c51fba5

Please sign in to comment.