Skip to content

Commit

Permalink
Move Fill Post Terms style to theme.json.
Browse files Browse the repository at this point in the history
Continued work on #8
  • Loading branch information
justintadlock committed Jun 2, 2024
1 parent ea11a05 commit 3dd3e17
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 71 deletions.
2 changes: 1 addition & 1 deletion public/css/blocks/core/post-terms.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'd6f3c391418e78d753c6');
<?php return array('dependencies' => array(), 'version' => 'b03f3fcfeba45f0443b1');
2 changes: 1 addition & 1 deletion public/css/blocks/core/post-terms.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions resources/scss/blocks/core/post-terms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,10 @@
.wp-block-post-terms.is-style-fill {
--wp--custom--gap: var(--wp--preset--spacing--minus-1);

font-family: var(--wp--custom--fill--font-family, inherit);
font-size: var(--wp--custom--fill--font-size, inherit);
font-style: var(--wp--custom--fill--font-style, inherit);
font-weight: var(--wp--custom--fill--font-weight, inherit);

.wp-block-post-terms__separator { display: none; }

a {
display: inline-block;
text-decoration: none;
padding: var( --wp--preset--spacing--minus-2 ) var( --wp--preset--spacing--base );

color: var(--wp--custom--fill--color, inherit) !important;
background: var(--wp--custom--fill--background, transparent);
border-width: var(--wp--custom--fill--border-width, 0);
border-style: var(--wp--custom--fill--border-style, solid);
border-color: var(--wp--custom--fill--border-color, currentColor);
border-radius: var(--wp--custom--fill--border-radius, 0);
box-shadow: var(--wp--custom--fill--shadow, none);

&:hover,
&:focus {
text-decoration: underline;

color: var(--wp--custom--fill--hover-color, inherit) !important;
background: var(--wp--custom--fill--hover-background, transparent);
}
}
}

Expand Down
31 changes: 23 additions & 8 deletions styles/chestnut-rose.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
"lineHeight": "var:preset|line-height|xs"
}
}
},
"core/post-terms": {
"custom": {
"fill": {
"fontWeight": "300",
"hoverBackground": "var:preset|color|primary-500"
}
}
}
},
"color": {
Expand Down Expand Up @@ -337,6 +329,29 @@
},
"css": "& .wp-block-navigation-item:hover, .wp-block-navigation-item:focus {\n\tcolor: var(--wp--preset--color--700);\n\tbackground: var(--wp--preset--color--neutral-100);\n}"
},
"core/post-terms": {
"variations": {
"fill": {
"typography": {
"fontWeight": "300"
},
"elements": {
"link": {
":focus": {
"color": {
"background": "var:preset|color|primary-500"
}
},
":hover": {
"color": {
"background": "var:preset|color|primary-500"
}
}
}
}
}
}
},
"core/separator": {
"color": {
"text": "var:preset|color|primary-500"
Expand Down
28 changes: 20 additions & 8 deletions styles/extant.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
"lineHeight": "var:preset|line-height|xs"
}
}
},
"core/post-terms": {
"custom": {
"fill": {
"hoverColor": "var:preset|color|base",
"hoverBackground": "var:preset|color|contrast"
}
}
}
},
"custom": {
Expand Down Expand Up @@ -635,6 +627,26 @@
}
}
}
},
"variations": {
"fill": {
"elements": {
"link": {
":focus": {
"color": {
"background": "var:preset|color|contrast",
"text": "var:preset|color|base"
}
},
":hover": {
"color": {
"background": "var:preset|color|contrast",
"text": "var:preset|color|base"
}
}
}
}
}
}
},
"core/pullquote": {
Expand Down
27 changes: 20 additions & 7 deletions styles/thunderbird.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@
}
}
},
"core/post-terms": {
"custom": {
"fill": {
"hoverBackground": "var:preset|color|neutral-950"
}
}
},
"core/table": {
"custom": {
"stripes": {
Expand Down Expand Up @@ -381,6 +374,26 @@
}
}
},
"core/post-terms": {
"variations": {
"fill": {
"elements": {
"link": {
":focus": {
"color": {
"background": "var:preset|color|neutral-950"
}
},
":hover": {
"color": {
"background": "var:preset|color|neutral-950"
}
}
}
}
}
}
},
"core/pullquote": {
"typography": {
"fontFamily": "var:preset|font-family|primary",
Expand Down
33 changes: 24 additions & 9 deletions styles/unravel.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@
"fontFamily": "var:preset|font-family|primary"
}
}
},
"core/post-terms": {
"custom": {
"fill": {
"color": "var:preset|color|primary-950",
"background": "var:preset|color|primary-100",
"hoverBackground": "var:preset|color|primary-300"
}
}
}
},
"color": {
Expand Down Expand Up @@ -507,6 +498,30 @@
}
}
},
"core/post-terms": {
"variations": {
"fill": {
"elements": {
"link": {
"color": {
"background": "var:preset|color|primary-100",
"text": "var:preset|color|primary-950"
},
":focus": {
"color": {
"background": "var:preset|color|primary-300"
}
},
":hover": {
"color": {
"background": "var:preset|color|primary-300"
}
}
}
}
}
}
},
"core/site-title": {
"typography": {
"fontSize": "var:preset|font-size|xl",
Expand Down
64 changes: 50 additions & 14 deletions theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@
}
}
},
"core/post-terms": {
"custom": {
"fill": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs",
"color": "var:preset|color|base",
"background": "var:preset|color|primary-700",
"borderRadius": "var:custom|global|border-radius",
"shadow": "var:preset|shadow|md",
"hoverBackground": "var:preset|color|primary-950"
}
}
},
"core/separator": {
"color": {
"customGradient": false
Expand Down Expand Up @@ -1485,7 +1472,7 @@
"radius": "var:custom|global|border-radius"
},
"color": {
"text": "var:preset|color|contrast",
"text": "red",
"background": "var:preset|color|base"
},
"shadow": "var:preset|shadow|md",
Expand Down Expand Up @@ -1631,6 +1618,55 @@
"lineHeight": "var:custom|line-height|sm"
}
},
"core/post-terms": {
"variations": {
"fill": {
"typography": {
"fontSize": "var:preset|font-size|xs",
"lineHeight": "var:custom|line-height|xs"
},
"elements": {
"link": {
"border": {
"radius": "var:custom|global|border-radius"
},
"color": {
"text": "var:preset|color|base",
"background": "var:preset|color|primary-700"
},
"shadow": "var:preset|shadow|md",
"spacing": {
"padding": {
"top": "var:preset|spacing|minus-2",
"bottom": "var:preset|spacing|minus-2",
"left": "var:preset|spacing|base",
"right": "var:preset|spacing|base"
}
},
"typography": {
"textDecoration": "none"
},
":focus": {
"color": {
"background": "var:preset|color|primary-950"
},
"typography": {
"textDecoration": "underline"
}
},
":hover": {
"color": {
"background": "var:preset|color|primary-950"
},
"typography": {
"textDecoration": "underline"
}
}
}
}
}
}
},
"core/quote": {
"border": {
"color": {
Expand Down

0 comments on commit 3dd3e17

Please sign in to comment.