Skip to content

Commit

Permalink
Improve(Normal CSS): Support modular import on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Nov 22, 2023
1 parent 785b145 commit e7451d9
Show file tree
Hide file tree
Showing 23 changed files with 256 additions and 137 deletions.
3 changes: 3 additions & 0 deletions packages/normal.css/consistent-abbreviation-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
abbr[title] {
text-decoration: underline dotted;
}
3 changes: 3 additions & 0 deletions packages/normal.css/consistent-bold-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
b, strong {
font-weight: bolder;
}
30 changes: 30 additions & 0 deletions packages/normal.css/consistent-control-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
::-moz-focus-inner {
border-style: none;
padding: 0;
}

:-moz-ui-invalid {
box-shadow: none;
}

progress {
vertical-align: baseline;
}

[type="search"] {
appearance: textfield;
outline-offset: -2px;
}

::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
height: auto;
}

::-webkit-search-decoration {
-webkit-appearance: none;
}

::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
4 changes: 4 additions & 0 deletions packages/normal.css/consistent-horizontal-lines.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hr {
height: 0;
color: inherit;
}
3 changes: 3 additions & 0 deletions packages/normal.css/consistent-small-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
small {
font-size: 80%;
}
14 changes: 14 additions & 0 deletions packages/normal.css/consistent-superscript-subscript.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}

sub {
bottom: -0.25em;
}

sup {
top: -0.5em;
}
4 changes: 4 additions & 0 deletions packages/normal.css/consistent-table-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
table {
text-indent: 0;
border-color: inherit;
}
9 changes: 9 additions & 0 deletions packages/normal.css/improve-user-recognition.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[role=button], summary,
:where(button, [type=button]):not([disabled]) {
cursor: pointer;
user-select: none;
}

a {
cursor: pointer;
}
3 changes: 0 additions & 3 deletions packages/normal.css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
],
"main": "./dist/index.bundle.css",
"style": "./dist/index.bundle.css",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 4 additions & 0 deletions packages/normal.css/readable-tab-size.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
-moz-tab-size: 4;
tab-size: 4;
}
4 changes: 4 additions & 0 deletions packages/normal.css/remove-anchor-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
a {
color: inherit;
text-decoration: none;
}
8 changes: 8 additions & 0 deletions packages/normal.css/remove-control-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
button, input, optgroup, select, textarea {
font-family: inherit;
font-size: 100%;
margin: 0;
padding: 0;
color: inherit;
background-color: transparent;
}
3 changes: 3 additions & 0 deletions packages/normal.css/remove-list-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ul {
list-style: none;
}
139 changes: 23 additions & 116 deletions packages/normal.css/src/index.css
Original file line number Diff line number Diff line change
@@ -1,116 +1,23 @@
@import './intuitive-sizing-control.css';
@import './eliminate-click-delays.css';
@import './remove-default-borders.css';
@import './remove-default-spacing.css';
@import './remove-tap-highlight.css';
@import './better-text-appearance.css';
@import './responsive-media-elements.css';

body {
-moz-tab-size: 4;
tab-size: 4;
}

b, strong {
font-weight: bolder;
}

ul {
list-style: none;
}

hr {
height: 0;
color: inherit;
}

small {
font-size: 80%;
}

button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
margin: 0;
padding: 0;
color: inherit;
background-color: transparent;
}

sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}

sub {
bottom: -0.25em;
}

sup {
top: -0.5em;
}

a {
color: inherit;
text-decoration: none;
}

abbr[title] {
text-decoration: underline dotted;
}

table {
text-indent: 0;
border-color: inherit;
}

button,
select {
text-transform: none;
}

a,
[type=button]:not([disabled]),
[role=button],
button:not([disabled]) {
cursor: pointer;
}

::-moz-focus-inner {
border-style: none;
padding: 0;
}

:-moz-ui-invalid {
box-shadow: none;
}

progress {
vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}

::-webkit-search-decoration {
-webkit-appearance: none;
}

::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}

summary {
display: list-item;
}
@import '../better-text-appearance';
@import '../eliminate-click-delays';
@import '../improve-user-recognition';
@import '../intuitive-sizing-control';
@import '../readable-tab-size';
@import '../responsive-media-elements';

/* consistent */
@import '../consistent-abbreviation-styles';
@import '../consistent-bold-styles';
@import '../consistent-control-styles';
@import '../consistent-horizontal-lines';
@import '../consistent-small-styles';
@import '../consistent-superscript-subscript';
@import '../consistent-table-styles';

/* remove */
@import '../remove-anchor-styles';
@import '../remove-control-styles';
@import '../remove-default-borders';
@import '../remove-default-spacing';
@import '../remove-tap-highlight';
@import '../remove-list-styles';
Loading

0 comments on commit e7451d9

Please sign in to comment.