1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-29 16:59:58 +02:00

containersにroundedを追加

This commit is contained in:
BcRikko
2018-11-26 15:45:40 +09:00
parent 2b53f16766
commit 0648923dbe
5 changed files with 74 additions and 4 deletions

View File

@@ -520,6 +520,30 @@ button,
border-radius: 4px; border-radius: 4px;
} }
.container.is-rounded {
padding: 1rem 1.5rem;
margin: 14px 8px;
}
.container.is-rounded::after {
border: none;
border-radius: 0;
box-shadow: 0 -4px #fff, 0 -8px #212529, 4px 0 #fff, 4px -4px #212529, 8px 0 #212529, 0 4px #fff, 0 8px #212529, -4px 0 #fff, -4px 4px #212529, -8px 0 #212529, -4px -4px #212529, 4px 4px #212529;
}
.container.is-rounded.is-dark::after {
border: none;
border-radius: 0;
box-shadow: 0 -4px #212529, 0 -8px #fff, 4px 0 #212529, 4px -4px #fff, 8px 0 #fff, 0 4px #212529, 0 8px #fff, -4px 0 #212529, -4px 4px #fff, -8px 0 #fff, -4px -4px #fff, 4px 4px #fff;
}
.container.is-rounded.is-dark::before {
top: -8px;
right: -8px;
bottom: -8px;
left: -8px;
}
.container.with-title { .container.with-title {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

File diff suppressed because one or more lines are too long

5
css/nes.min.css vendored

File diff suppressed because one or more lines are too long

View File

@@ -59,6 +59,12 @@
<label class="title">Container.is-dark</label> <label class="title">Container.is-dark</label>
<p style="color: white;">Good morning. Thou hast had a good night's sleep I hope.</p> <p style="color: white;">Good morning. Thou hast had a good night's sleep I hope.</p>
</div> </div>
<div class="container is-rounded">
<p>Good morning. Thou hast had a good night's sleep I hope.</p>
</div>
<div class="container is-rounded is-dark">
<p style="color: white;">Good morning. Thou hast had a good night's sleep I hope.</p>
</div>
<div> <div>
<label><input type="radio" class="radio" name="answer" checked /><span>Yes</span></label> <label><input type="radio" class="radio" name="answer" checked /><span>Yes</span></label>

View File

@@ -31,6 +31,47 @@
border-radius: 4px; border-radius: 4px;
} }
@mixin rounded($base, $background) {
border: none;
border-radius: 0;
// prettier-ignore
box-shadow:
0 -4px $background,
0 -8px $base,
4px 0 $background,
4px -4px $base,
8px 0 $base,
0 4px $background,
0 8px $base,
-4px 0 $background,
-4px 4px $base,
-8px 0 $base,
-4px -4px $base,
4px 4px $base;
}
&.is-rounded {
padding: 1rem 1.5rem;
margin: 14px 8px;
&::after {
@include rounded($base-color, $background-color);
}
&.is-dark {
&::after {
@include rounded($background-color, $base-color);
}
&::before {
top: -8px;
right: -8px;
bottom: -8px;
left: -8px;
}
}
}
&.with-title { &.with-title {
display: flex; display: flex;
flex-direction: column; flex-direction: column;