Skip to content

Commit

Permalink
update layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
kjroelke committed Jul 30, 2024
1 parent 08ba5ee commit a291472
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ A Template repo to help spin up custom child themes for clients quickly.

# Changelog

## 0.2.2

- Add max-width and content sizes for Cornerstone with WordPress variables (generated by theme.json)
- Add `1.25rem (20px)` gutters to the site

## 0.2.1

- bug fixes
Expand Down
Empty file removed src/styles/_global.scss
Empty file.
26 changes: 26 additions & 0 deletions src/styles/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Layout
* Sets Cornerstone's layout styles to mirror WordPress Content & Wide Sizes
* Also sets a default gutter to 1.25rem (defined in theme.json)
*/
.x-container {
&.max {
max-width: var(--wp--style--global--wide-size);
}
&.width {
width: calc(100% - var(--wp--custom--gutters));

& > * {
max-width: 100%;
}
}
&.offset {
max-width: 100%;
}
}

.x-row {
& > .x-row-inner {
margin-inline: calc((var(--wp--custom--gutters) / 2) * -1);
}
}
2 changes: 1 addition & 1 deletion src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@use "./reset";
@use "./typography";
@use "./global";
@use "./layout";
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://github.com/kingdom-one/[client-repo]
Author: Kingdom One
Author URI: https://wwww.kingdomone.co
Description: A custom Wordpress theme for [Client Name], built on the back of Pro Theme (by Themeco).
Version: 0.2.1
Version: 0.2.2
License: GNU General Public License v2 or later
Template: pro
*/
3 changes: 2 additions & 1 deletion theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"lineHeight": "calc(2px + 2ex + 2px)",
"transitionTiming": ".15s",
"transitionEasing": "ease-in-out",
"transition": "var(--wp--custom--transition-timing) var(--wp--custom--transition-easing)"
"transition": "var(--wp--custom--transition-timing) var(--wp--custom--transition-easing)",
"gutters": "1.25rem"
}
},
"styles": {
Expand Down

0 comments on commit a291472

Please sign in to comment.