Skip to content

Commit

Permalink
Merge pull request #311 from adobe/css-cleanup
Browse files Browse the repository at this point in the history
chore: css cleanup
  • Loading branch information
fkakatie authored Dec 14, 2023
2 parents efc8214 + b1ddd3c commit 74cf33f
Showing 7 changed files with 45 additions and 89 deletions.
4 changes: 2 additions & 2 deletions blocks/cards/cards.css
Original file line number Diff line number Diff line change
@@ -3,12 +3,12 @@
margin: 0;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
grid-gap: 16px;
}

.cards > ul > li {
border: 1px solid var(--highlight-background-color);
border: 1px solid var(--dark-color);
background-color: var(--background-color)
}

4 changes: 2 additions & 2 deletions blocks/footer/footer.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
footer {
padding: 2rem;
background-color: var(--overlay-background-color);
background-color: var(--light-color);
font-size: var(--body-font-size-s);
}

@@ -11,4 +11,4 @@ footer .footer {

footer .footer p {
margin: 0;
}
}
11 changes: 5 additions & 6 deletions blocks/fragment/fragment.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* suppress nested section padding */

.fragment-wrapper > .section {
padding-left: 0;
padding-right: 0;
padding-left: 0;
padding-right: 0;
}

.fragment-wrapper > .section:first-of-type {
padding-top: 0;
padding-top: 0;
}

.fragment-wrapper > .section:last-of-type {
padding-bottom: 0;
}
padding-bottom: 0;
}
4 changes: 2 additions & 2 deletions blocks/header/header.css
Original file line number Diff line number Diff line change
@@ -248,7 +248,7 @@ header nav .nav-sections ul > li > ul > li {
width: 200px;
margin-top: 12px;
padding: 1em;
background-color: var(--highlight-background-color);
background-color: var(--light-color);
white-space: initial;
}

@@ -261,7 +261,7 @@ header nav .nav-sections ul > li > ul > li {
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid var(--highlight-background-color);
border-bottom: 8px solid var(--light-color);
}

header nav .nav-sections .default-content-wrapper > ul > li > ul > li {
12 changes: 5 additions & 7 deletions blocks/hero/hero.css
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
/* block specific CSS goes here */

main .hero-container > div {
max-width: unset;
}

main .hero-container {
padding: 0;
}
main .hero {

.hero {
position: relative;
padding: 32px;
min-height: 300px;
}

main .hero h1 {
.hero h1 {
max-width: 1200px;
margin-left: auto;
margin-right: auto;
color: white;
}

main .hero picture {
.hero picture {
position: absolute;
z-index: -1;
inset: 0;
object-fit: cover;
box-sizing: border-box;
}

main .hero img {
.hero img {
object-fit: cover;
width: 100%;
height: 100%;
32 changes: 16 additions & 16 deletions styles/fonts.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@font-face {
font-family: roboto;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../fonts/roboto-bold.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: roboto;
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../fonts/roboto-regular.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
font-family: roboto;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../fonts/roboto-bold.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
font-family: roboto;
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../fonts/roboto-regular.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
67 changes: 13 additions & 54 deletions styles/styles.css
Original file line number Diff line number Diff line change
@@ -10,14 +10,14 @@
* governing permissions and limitations under the License.
*/

:root {
:root {
/* colors */
--link-color: #035fe6;
--link-hover-color: #136ff6;
--background-color: #fff;
--overlay-background-color: #eee;
--highlight-background-color: #ccc;
--text-color: #000;
--background-color: white;
--light-color: #eee;
--dark-color: #ccc;
--text-color: black;

/* fonts */
--body-font-family: roboto, roboto-fallback;
@@ -39,7 +39,6 @@

/* nav height */
--nav-height: 64px;

}

@font-face {
@@ -49,7 +48,6 @@
src: local('Arial');
}


@media (width >= 900px) {
:root {
--heading-font-size-xxl: 60px;
@@ -101,19 +99,12 @@ p, dl, ol, ul, pre, blockquote {
margin-bottom: 1em;
}

hr {
margin-top: 1.5em;
margin-bottom: 1.5em;
border: 0;
border-bottom: 1px solid var(--overlay-background-color);
}

code, pre, samp {
code, pre {
font-family: var(--fixed-font-family);
font-size: var(--body-font-size-s);
}

code, samp {
code {
padding: .125em;
}

@@ -122,13 +113,14 @@ pre {
}

main pre {
background-color: var(--overlay-background-color);
background-color: var(--light-color);
padding: 1em;
border-radius: .25em;
overflow-x: auto;
white-space: pre;
}

/* links */
a:any-link {
color: var(--link-color);
text-decoration: none;
@@ -166,7 +158,7 @@ a.button:hover, a.button:focus, button:hover, button:focus {
}

button:disabled, button:disabled:hover {
background-color: var(--overlay-background-color);
background-color: var(--light-color);
cursor: unset;
}

@@ -176,41 +168,6 @@ a.button.secondary, button.secondary {
color: var(--text-color)
}

main input {
font-size: 1.25rem;
width: 100%;
max-width: 50rem;
display: block;
margin-bottom: 1rem;
padding: 0.75rem 0.6rem;
border-radius: 0.25rem;
box-sizing: border-box;
border: 1px solid var(--text-color);
color: var(--text-color);
background-color: var(--background-color);
}

main input:hover {
border: 1px solid var(--text-color);
}

main blockquote {
font-style: italic;
margin: 3rem;
text-indent: -1rem;
hanging-punctuation: first;
}

main blockquote p::before {
content: "“";
line-height: 0;
}

main blockquote p::after {
content: "”";
line-height: 0;
}

main img {
max-width: 100%;
width: auto;
@@ -228,6 +185,7 @@ main img {
width: 100%;
}

/* sections */
main .section {
padding: 64px 16px;
}
@@ -246,6 +204,7 @@ main .section {
}

/* section metadata */
main .section.light,
main .section.highlight {
background-color: var(--highlight-background-color);
background-color: var(--light-color);
}

0 comments on commit 74cf33f

Please sign in to comment.