Skip to content

Commit

Permalink
Merge pull request #92 from Codeinwp/fix/issue-56
Browse files Browse the repository at this point in the history
feat: move caption color and font to theme.json
  • Loading branch information
HardeepAsrani authored Dec 12, 2023
2 parents b8e5eaf + 6fb6ca9 commit 8e21b2a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
12 changes: 2 additions & 10 deletions assets/css/src/blocks/_image.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
%figcaption {
text-align: left;
font-size: var(--wp--preset--font-size--small);
}

.wp-block-image {

&.aligncenter {
Expand All @@ -26,9 +21,7 @@
figure.wp-block-image {

figcaption {

@extend %figcaption;
color: var(--wp--preset--color--raft-fg);
text-align: left;
opacity: 0.6;
}
}
Expand All @@ -39,8 +32,7 @@ figure.wp-block-image {
figure.wp-block-image {

figcaption {

@extend %figcaption;
text-align: left;
background: rgba(0, 0, 0, 0.3);
margin: 0;
padding: 8px;
Expand Down
2 changes: 0 additions & 2 deletions assets/css/src/blocks/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
}

figcaption {
font-size: var(--wp--preset--font-size--small);
color: var(--wp--preset--color--raft-fg);
opacity: 0.6;
}
}
8 changes: 8 additions & 0 deletions theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,14 @@
"fontWeight": "600",
"lineHeight": "1.6"
}
},
"caption": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
},
"color": {
"text": "var(--wp--preset--color--raft-fg)"
}
}
},
"blocks": {
Expand Down

0 comments on commit 8e21b2a

Please sign in to comment.