Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Archeo: Try using button as an element #5849

Merged
merged 8 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions archeo/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,29 +77,37 @@ a:active,
* https://github.com/WordPress/gutenberg/issues/27075
*/

.wp-block-search__button:hover,
.wp-block-file .wp-block-file__button:hover,
.wp-block-button__link:hover {
background-color: var(--wp--preset--color--primary);
}

/*
* Search and File Block button styles.
* File Block button styles.
* Necessary until the following issues are resolved in Gutenberg:
* https://github.com/WordPress/gutenberg/issues/36444
* https://github.com/WordPress/gutenberg/issues/27760
*/

.wp-block-search__button,
.wp-block-file .wp-block-file__button {
background-color: var(--wp--preset--color--foreground);
border-radius: 0;
border: none;
color: var(--wp--preset--color--background);
font-size: var(--wp--preset--typography--font-size--normal);
font-size: var(--wp--preset--font-size--normal);
padding: calc(0.667em + 2px) calc(1.333em + 2px);
}

/*
* Outline block button needs a padding tweak so it's the same size of normal buttons
* https://github.com/WordPress/gutenberg/issues/27476
*/
.is-style-outline > :where(.wp-block-button__link),
:where(.wp-block-button__link).is-style-outline {
padding-top: 0.667em;
padding-bottom: 0.667em;
}


/*
* Comment Form Fields
*/
Expand Down
30 changes: 21 additions & 9 deletions archeo/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,7 @@
"styles": {
"blocks": {
"core/button": {
"border": {
"radius": "0"
},
"color": {
"background": "var(--wp--preset--color--foreground)",
"text": "var(--wp--preset--color--background)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--chivo)",
"fontSize": "var(--wp--preset--typography--font-size--normal)",
"textTransform": "uppercase"
}
},
Expand Down Expand Up @@ -276,6 +267,27 @@
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
},
"button": {
"border": {
"radius": "0"
},
"color": {
"background": "var(--wp--preset--color--foreground)",
"text": "var(--wp--preset--color--background)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--chivo)",
"fontSize": "var(--wp--preset--font-size--normal)"
},
"spacing": {
"padding": {
"top": "calc(0.667em + 2px)",
"bottom": "calc(0.667em + 2px)",
"left": "calc(1.333em + 2px)",
"right": "calc(1.333em + 2px)"
}
}
}
},
"spacing": {
Expand Down