1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-19 12:31:21 +02:00

🎉 containersを追加

This commit is contained in:
BcRikko
2018-11-25 20:54:56 +09:00
parent e427793257
commit f1e9ebc8e3
6 changed files with 152 additions and 5 deletions

View File

@@ -477,4 +477,70 @@ button,
.btn.is-error:active {
box-shadow: inset 4px 4px #8c2022;
}
.container {
position: relative;
padding: 1.5rem 2rem;
}
.container::before, .container::after {
position: absolute;
z-index: -1;
content: "";
}
.container::before {
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.container::after {
top: 2px;
right: 2px;
bottom: 2px;
left: 2px;
border-color: #212529;
border-style: solid;
border-width: 4px;
border-radius: 4px;
}
.container.with-title {
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-top: 2rem;
}
.container.with-title > .title {
position: absolute;
top: 0;
padding: 0 0.5rem;
margin: 0;
font-size: 1rem;
background-color: #fff;
}
.container.with-title.is-center {
align-items: center;
}
.container.with-title.is-right {
align-items: right;
}
.container.is-dark::before {
background-color: #212529;
}
.container.is-dark::after {
border-color: #fff;
}
.container.is-dark > .title {
color: #fff;
background-color: #212529;
}
/*# sourceMappingURL=nes.css.map */

File diff suppressed because one or more lines are too long

6
css/nes.min.css vendored

File diff suppressed because one or more lines are too long

View File

@@ -56,5 +56,16 @@
<button type="button" class="btn is-success">Success</button>
<button type="button" class="btn is-warning">Warning</button>
<button type="button" class="btn is-error">Error</button>
<div class="container with-title is-center">
<label class="title">Container.is-center</label>
<p>Good morning. Thou hast had a good night's sleep I hope.</p>
</div>
<div class="container is-dark with-title">
<label class="title">Container.is-dark</label>
<p style="color: white;">
Good morning. Thou hast had a good night's sleep I hope.
</p>
</div>
</body>
</html>

View File

@@ -1,3 +1,4 @@
@charset "utf-8";
@import "buttons.scss";
@import "containers.scss";

View File

@@ -0,0 +1,68 @@
.container {
position: relative;
padding: 1.5rem 2rem;
&::before,
&::after {
position: absolute;
z-index: -1;
content: "";
}
&::before {
top: 0;
right: 0;
bottom: 0;
left: 0;
}
&::after {
top: 2px;
right: 2px;
bottom: 2px;
left: 2px;
border-color: $base-color;
border-style: solid;
border-width: 4px;
border-radius: 4px;
}
&.with-title {
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-top: 2rem;
> .title {
position: absolute;
top: 0;
padding: 0 0.5rem;
margin: 0;
font-size: 1rem;
background-color: $background-color;
}
&.is-center {
align-items: center;
}
&.is-right {
align-items: right;
}
}
&.is-dark {
&::before {
background-color: $base-color;
}
&::after {
border-color: #fff;
}
> .title {
color: $background-color;
background-color: $base-color;
}
}
}