lism-css 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,10 @@
1
1
  @use './_mixin' as mixin;
2
2
 
3
3
  /* 参考
4
- - https://github.com/necolas/normalize.css/blob/master/normalize.css
4
+
5
5
  - https://github.com/filipelinhares/ress/blob/master/ress.css
6
6
  - https://elad2412.github.io/the-new-css-reset/
7
+ - https://www.joshwcomeau.com/css/custom-css-reset/
7
8
  */
8
9
 
9
10
  /* ------------------------------------------------------------
@@ -13,84 +14,99 @@
13
14
  - padding は ブラウザ標準スタイルのまま
14
15
  - margin はすべて 0 にリセット
15
16
  ------------------------------------------------------------ */
16
- *,
17
- ::before,
18
- ::after {
19
- box-sizing: border-box;
20
- }
21
-
22
- * {
23
- margin: 0;
24
- }
25
-
26
- /* ------------------------------------------------------------
17
+ @layer lism-reset {
18
+ *,
19
+ ::before,
20
+ ::after {
21
+ box-sizing: border-box;
22
+ }
23
+
24
+ * {
25
+ margin: 0;
26
+ }
27
+
28
+ /* ------------------------------------------------------------
27
29
  Texts
28
30
  ------------------------------------------------------------ */
29
31
 
30
- /* テキストのオーバーフローを回避 */
31
- @include mixin.maybe_where('p, h1, h2, h3, h4, h5, h6', '') {
32
- overflow-wrap: break-word;
33
- }
34
-
35
- /* ルビのサイズ統一 */
36
- rt {
37
- font-size: 50%;
38
- }
39
-
40
- /* ------------------------------------------------------------
32
+ /* テキストのオーバーフローを回避 */
33
+ p,
34
+ h1,
35
+ h2,
36
+ h3,
37
+ h4,
38
+ h5,
39
+ h6 {
40
+ overflow-wrap: break-word;
41
+ }
42
+
43
+ /* ルビのサイズ統一 */
44
+ rt {
45
+ font-size: 50%;
46
+ }
47
+
48
+ /* ------------------------------------------------------------
41
49
  Medias
42
50
  ------------------------------------------------------------ */
43
51
 
44
- /* 親要素をはみ出さないようにする */
45
- @include mixin.maybe_where('img, video', '') {
46
- max-inline-size: 100%;
47
- block-size: auto;
48
- }
49
-
50
- /* 隙間ができるのを防ぐ。( display はいじらない。) */
51
- @include mixin.maybe_where('svg, img, video, audio', '') {
52
- vertical-align: middle;
53
- }
54
-
55
- /* iframe は display block */
56
- @include mixin.maybe_where('iframe, embed, object', '') {
57
- display: block;
58
- border: none;
59
- }
60
-
61
- /* ------------------------------------------------------------
52
+ /* 親要素をはみ出さないようにする */
53
+ img,
54
+ video {
55
+ max-inline-size: 100%;
56
+ block-size: auto;
57
+ }
58
+
59
+ /* 隙間ができるのを防ぐ。( display はいじらない。) */
60
+ svg,
61
+ img,
62
+ video,
63
+ audio {
64
+ vertical-align: middle;
65
+ }
66
+
67
+ /* iframe は display block */
68
+ iframe {
69
+ display: block;
70
+ border: none;
71
+ }
72
+
73
+ /* ------------------------------------------------------------
62
74
  Form fields
63
75
  - 基本要素のフォントとカラーをリセット
64
76
  - テキストエリアの水平リサイズを無効に
65
77
  - カーソルのセット
66
78
  ------------------------------------------------------------ */
67
- @include mixin.maybe_where('input, button, textarea, select', '') {
68
- font: inherit;
69
- color: inherit;
70
- text-transform: none;
71
- }
72
-
73
- /* テキストエリアの水平リサイズを無効に */
74
- textarea {
75
- resize: vertical;
76
- }
77
-
78
- /* ------------------------------------------------------------
79
+ input,
80
+ button,
81
+ textarea,
82
+ select {
83
+ font: inherit;
84
+ color: inherit;
85
+ text-transform: none;
86
+ }
87
+
88
+ /* テキストエリアの水平リサイズを無効に */
89
+ textarea {
90
+ resize: vertical;
91
+ }
92
+
93
+ /* ------------------------------------------------------------
79
94
  cursor 初期セット
80
95
  ------------------------------------------------------------ */
81
- // :where([type='button'], [type='reset'], [type='submit'], [type='radio'], [type='checkbox']),
82
- // :where([t[role='option'], [role='button'], [aria-controls]),
83
- button,
84
- label,
85
- select,
86
- summary {
87
- cursor: pointer;
88
- }
89
-
90
- :disabled {
91
- cursor: not-allowed;
92
- }
93
-
94
- [aria-busy='true'] {
95
- cursor: progress;
96
+ // :where([type='button'], [type='reset'], [type='submit']),
97
+ // :where([t[role='option'], [role='button'], [aria-controls]),
98
+ button,
99
+ label,
100
+ select,
101
+ summary,
102
+ [type='radio'],
103
+ [type='checkbox'] {
104
+ cursor: pointer;
105
+ }
106
+
107
+ :disabled {
108
+ cursor: not-allowed;
109
+ }
110
+
111
+ // [aria-busy='true'] {cursor: progress;}
96
112
  }