-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'utelecon/202308-organize-styles'
- Loading branch information
Showing
25 changed files
with
223 additions
and
512 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# @styles/README | ||
|
||
ここでは,このフォルダにあるCSSについて説明します.CSSを加筆する際は,まずこの説明を読んでから作成してください. | ||
|
||
このファイルの説明は,CSSに関する基礎知識を前提としています. | ||
|
||
このファイルは工事中です. | ||
|
||
## `@layouts`および`@components/utils`との棲み分けについて | ||
|
||
`@layouts`や`@components/utils`にある`.astro`ファイルには,そのコンポーネントだけに適用されるCSSを一緒に記述することができます.`@styles`にあるべきCSSと`@layouts`や`@components/utils`にあるべきCSSの棲み分けは,以下のようになります. | ||
|
||
- `@styles`:以下の2種類のCSSを書きます. | ||
- グローバルに適用されるCSS:各ページのMarkdownの範囲に適用されるべきCSS | ||
- 多くのMarkdownで利用されるCSS:`.box`や`img.medium`などのユーティリティクラス | ||
- `@layouts`:ヘッダーやフッターなど,各ページのMarkdownの範囲外でのみ利用されるCSSを書きます. | ||
- `@components/utils`:各コンポーネントの中でのみ利用されるCSSを書きます. | ||
|
||
## `components`以下で定義されているユーティリティクラスについて | ||
|
||
`@styles/components`にはユーティリティクラスが定義されています.これらのクラスはグローバルに適用されており,Markdown内で適用することができます. | ||
|
||
### `.box`系 | ||
|
||
- `.box` | ||
- `.box--important` | ||
- `.box--alert` | ||
- `strong.box`, `b.box` | ||
|
||
### `.cards` | ||
|
||
- `.cards` | ||
- `.cards + h2` | ||
|
||
### `img`系 | ||
|
||
- `img.large`, `img.medium`, `img.small` | ||
- `img.inline` | ||
- `img.logo` | ||
- `img.center` | ||
- `img.border` | ||
- `img.shadow` | ||
|
||
### `figure`系 | ||
|
||
- `figure` | ||
- `figcaption` | ||
|
||
### `.gallery` | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
} | ||
} | ||
|
||
strong.box, b.box { | ||
strong.box, | ||
b.box { | ||
@include box--bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
code { | ||
padding: 0.2em 0.4em; | ||
font-size: 0.9em; | ||
color: black; | ||
background-color: $white-gray-light; | ||
padding: 0.2em 0.4em; | ||
font-size: 0.9em; | ||
color: black; | ||
background-color: $white-gray-light; | ||
} | ||
|
||
code, | ||
pre { | ||
&, | ||
&:lang(en) { | ||
hyphens: none; | ||
} | ||
} | ||
|
||
code em { | ||
font-style: normal; | ||
font-weight: bold; | ||
background-color: yellow; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.footnotes { | ||
padding-top: 0.5em; | ||
border-top: 2px solid $gray; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@media (max-width: 640px) { | ||
ul, | ||
ol { | ||
padding-left: 20px; | ||
} | ||
} | ||
|
||
@counter-style decimal-bracket { | ||
system: extends decimal; | ||
prefix: "["; | ||
suffix: "] "; | ||
} | ||
|
||
ol.bracket { | ||
list-style: decimal-bracket; | ||
} | ||
|
||
// remove user agent stylesheet against <p> element inside <li> | ||
li > p, | ||
.box > p, | ||
.box--alert > p, | ||
details > p { | ||
margin: 0; | ||
} | ||
|
||
ul.gap, | ||
ol.gap { | ||
& > li { | ||
margin-top: 1em; | ||
margin-bottom: 1em; | ||
} | ||
& > li:first-child { | ||
margin-top: 0; | ||
} | ||
& > li:last-child { | ||
margin-bottom: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
summary { | ||
cursor: pointer; | ||
color: $link-color; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
table { | ||
border-collapse: collapse; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.alert { | ||
color: $red; | ||
} | ||
|
||
.center { | ||
text-align: center; | ||
} | ||
|
||
.iframe-container { | ||
position: relative; | ||
width: 100%; | ||
height: 0; | ||
--aspect-ratio: 56.25%; | ||
padding-bottom: var(--aspect-ratio); | ||
> iframe { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.