Skip to content

Commit

Permalink
✨ feat(default.scss): Improving default styling
Browse files Browse the repository at this point in the history
- Updated fieldset
- Fixed audio html element not displaying
- Header elements now have margin-bottom: 1rem by default
- Input types button and reset no longer span 100% width
  • Loading branch information
Spiderpig86 committed Jun 11, 2020
1 parent 828aa26 commit 5678de0
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 38 deletions.
4 changes: 2 additions & 2 deletions dist/cirrus-core.css
Original file line number Diff line number Diff line change
Expand Up @@ -662,15 +662,15 @@ h6 {
line-height: 1.2;
}

/* Silent header */
/* Silent header Deprecated 0.5.6
h1 .silent,
h2 .silent,
h3 .silent,
h4 .silent,
h5 .silent,
h6 .silent {
color: #788196;
}
} */

h1 {
font-size: 3rem;
Expand Down
2 changes: 1 addition & 1 deletion dist/cirrus-core.min.css

Large diffs are not rendered by default.

81 changes: 62 additions & 19 deletions dist/cirrus.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ul {
img,
embed,
object,
audio,
video {
max-width: 100%;
height: auto; }
Expand Down Expand Up @@ -81,6 +80,11 @@ label {
display: inline-block;
margin: 0.25rem 0; }

fieldset {
padding: 1rem; }
fieldset legend {
font-weight: bold; }

[hidden] {
display: none !important; }

Expand Down Expand Up @@ -567,25 +571,51 @@ pre > code {
/* FONT */
@import url("https://fonts.googleapis.com/css?family=Nunito:200,300,400,600,700");
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,700");
h1,
h2,
h3,
h4,
h5,
h6 {
h1 {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2;
margin-bottom: 1rem; }

h2 {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2;
margin-bottom: 1rem; }

h3 {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2;
margin-bottom: 1rem; }

h4 {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2;
margin-bottom: 1rem; }

h5 {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2; }
line-height: 1.2;
margin-bottom: 1rem; }

/* Silent header */
h1 .silent,
h2 .silent,
h3 .silent,
h4 .silent,
h5 .silent,
h6 .silent {
color: #788196; }
h6 {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2;
margin-bottom: 1rem; }

/* Silent header Deprecated 0.5.6
h1 .silent,
h2 .silent,
h3 .silent,
h4 .silent,
h5 .silent,
h6 .silent {
color: #788196;
} */
h1 {
font-size: 3rem;
letter-spacing: 0.025rem; }
Expand Down Expand Up @@ -638,7 +668,7 @@ strong {
margin: 1rem 0; }

.title {
font-weight: bolder; }
font-weight: bold; }

.title:not(:last-child),
.subtitle:not(:last-child) {
Expand Down Expand Up @@ -852,7 +882,7 @@ kbd {
text-transform: uppercase; }

/* FORMS */
input:not([type=checkbox]):not([type=radio]):not([type=submit]),
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]),
select {
width: 100%;
border: 1px solid #ddd;
Expand Down Expand Up @@ -1246,7 +1276,20 @@ input:not([type=checkbox]):not([type=radio]):not([type=submit]).input-contains-i
background-color: var(--cirrus-bg);
max-height: 100vh;
padding: 0 2rem;
transition: all .3s; }
transition: all .3s;
/* Remove any padding set for headers in default.scss */ }
.header h1 {
margin: 0; }
.header h2 {
margin: 0; }
.header h3 {
margin: 0; }
.header h4 {
margin: 0; }
.header h5 {
margin: 0; }
.header h6 {
margin: 0; }

.header a {
color: #8292a2; }
Expand Down
2 changes: 1 addition & 1 deletion dist/cirrus.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/core/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ button.btn-close::after {
padding: .25rem 1rem;
font-size: 70%;
}

/* Big button */
.btn-large {
padding: .75rem 2rem;
Expand Down
9 changes: 8 additions & 1 deletion src/core/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ ul {
img,
embed,
object,
audio,
video {
max-width: 100%;
height: auto;
Expand Down Expand Up @@ -88,6 +87,14 @@ label {
margin: 0.25rem 0;
}

fieldset {
padding: 1rem;

legend {
font-weight: bold;
}
}

[hidden] {
display: none !important;
}
Expand Down
22 changes: 10 additions & 12 deletions src/core/font.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@
@import url("https://fonts.googleapis.com/css?family=Nunito:200,300,400,600,700");
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,700");

h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2;
@for $index from 1 through 6 {
h#{$index} {
font-family: "Montserrat", sans-serif;
font-weight: 700;
line-height: 1.2;
margin-bottom: 1rem;
}
}

/* Silent header */
/* Silent header Deprecated 0.5.6
h1 .silent,
h2 .silent,
h3 .silent,
h4 .silent,
h5 .silent,
h6 .silent {
color: #788196;
}
} */

h1 {
font-size: 3rem;
Expand Down Expand Up @@ -89,7 +87,7 @@ strong {
}

.title {
font-weight: bolder;
font-weight: bold;
}

.title:not(:last-child),
Expand Down
2 changes: 1 addition & 1 deletion src/core/forms.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* FORMS */

input:not([type=checkbox]):not([type=radio]):not([type=submit]),
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]),
select {
width: 100%;
border: 1px solid #ddd;
Expand Down
7 changes: 7 additions & 0 deletions src/core/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
max-height: 100vh;
padding: 0 2rem;
transition: all .3s;

/* Remove any padding set for headers in default.scss */
@for $i from 1 through 6 {
h#{$i} {
margin: 0;
}
}
}

.header a {
Expand Down

0 comments on commit 5678de0

Please sign in to comment.