From 243d05d5e79779c9e9dbb1c0348f83432e791971 Mon Sep 17 00:00:00 2001 From: Danny Dudzic Date: Thu, 25 Feb 2021 13:40:58 +0100 Subject: [PATCH 1/5] TT1: Add theme.json settings for the Pullquote block --- tt1-blocks/experimental-theme.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tt1-blocks/experimental-theme.json b/tt1-blocks/experimental-theme.json index 7b916304..3a6fddab 100644 --- a/tt1-blocks/experimental-theme.json +++ b/tt1-blocks/experimental-theme.json @@ -186,7 +186,11 @@ "unit": "20px", "horizontal": "25px", "vertical": "30px" + }, + "border": { + "width": "3px" } + } } }, @@ -272,6 +276,26 @@ "fontSize": "var(--wp--preset--font-size--extra-small)", "lineHeight": "var(--wp--custom--line-height--body)" } + }, + "core/pullquote": { + "typography": { + "fontSize": "var(--wp--preset--font-size--extra-large)", + "lineHeight": "var(--wp--custom--line-height--heading)" + }, + + "spacing": { + "padding": { + "top": "calc(2 * var(--wp--custom--spacing--unit))", + "bottom": "calc(2 * var(--wp--custom--spacing--unit))", + "left": "0", + "right": "0" + } + }, + "border": { + "radius": "0px", + "style": "solid", + "width": "var(--wp--custom--border--width)" + } } }, "customTemplates": { From 6203e704a584473622d4059aab4dcd388d9db072 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Thu, 19 Aug 2021 11:49:39 -0400 Subject: [PATCH 2/5] Migrate changes over to theme.json --- tt1-blocks/experimental-theme.json | 306 ----------------------------- tt1-blocks/theme.json | 19 ++ 2 files changed, 19 insertions(+), 306 deletions(-) delete mode 100644 tt1-blocks/experimental-theme.json diff --git a/tt1-blocks/experimental-theme.json b/tt1-blocks/experimental-theme.json deleted file mode 100644 index 3a6fddab..00000000 --- a/tt1-blocks/experimental-theme.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "templateParts": { - "header": { - "area": "header" - }, - "footer": { - "area": "footer" - } - }, - "settings": { - "defaults": { - "color": { - "palette": [ - { - "slug": "black", - "color": "#000000", - "name": "Black" - }, - { - "slug": "dark-gray", - "color": "#28303D", - "name": "Dark Gray" - }, - { - "slug": "gray", - "color": "#39414D", - "name": "Gray" - }, - { - "slug": "green", - "color": "#D1E4DD", - "name": "Green" - }, - { - "slug": "blue", - "color": "#D1DFE4", - "name": "Blue" - }, - { - "slug": "purple", - "color": "#D1D1E4", - "name": "Purple" - }, - { - "slug": "red", - "color": "#E4D1D1", - "name": "Red" - }, - { - "slug": "orange", - "color": "#E4DAD1", - "name": "Orange" - }, - { - "slug": "yellow", - "color": "#EEEADD", - "name": "Yellow" - }, - { - "slug": "white", - "color": "#FFFFFF", - "name": "White" - } - ], - "gradients": [ - { - "slug": "purple-to-yellow", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--purple), var(--wp--preset--color--yellow))", - "name": "Purple to Yellow" - }, - { - "slug": "yellow-to-purple", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--yellow), var(--wp--preset--color--purple))", - "name": "Yellow to Purple" - }, - { - "slug": "green-to-yellow", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--green), var(--wp--preset--color--yellow))", - "name": "Green to Yellow" - }, - { - "slug": "yellow-to-green", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--yellow), var(--wp--preset--color--green))", - "name": "Yellow to Green" - }, - { - "slug": "red-to-yellow", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--red), var(--wp--preset--color--yellow))", - "name": "Red to Yellow" - }, - { - "slug": "yellow-to-red", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--yellow), var(--wp--preset--color--red))", - "name": "Yellow to Red" - }, - { - "slug": "purple-to-red", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--purple), var(--wp--preset--color--red))", - "name": "Purple to Red" - }, - { - "slug": "red-to-purple", - "gradient": "linear-gradient(160deg, var(--wp--preset--color--red), var(--wp--preset--color--purple))", - "name": "Red to Purple" - } - ] - }, - "typography": { - "customLineHeight": true, - "fontSizes": [ - { - "slug": "extra-small", - "size": "16px", - "name": "Extra small" - }, - { - "slug": "small", - "size": "18px", - "name": "Small" - }, - { - "slug": "normal", - "size": "20px", - "name": "Normal" - }, - { - "slug": "large", - "size": "24px", - "name": "Large" - }, - { - "slug": "extra-large", - "size": "40px", - "name": "Extra large" - }, - { - "slug": "huge", - "size": "96px", - "name": "Huge" - }, - { - "slug": "gigantic", - "size": "144px", - "name": "Gigantic" - } - ], - "fontFamilies": [ - { - "fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif", - "slug": "system-font", - "name": "System Font" - }, - { - "fontFamily": "Helvetica Neue, Helvetica, Arial, sans-serif", - "slug": "helvetica-arial" - }, - { - "fontFamily": "Geneva, Tahoma, Verdana, sans-serif", - "slug": "geneva-verdana" - }, - { - "fontFamily": "Cambria, Georgia, serif", - "slug": "cambria-georgia" - }, - { - "fontFamily": "Hoefler Text, Baskerville Old Face, Garamond, Times New Roman, serif", - "slug": "hoefler-times-new-roman" - } - ] - }, - "spacing": { - "customPadding": true - }, - "custom": { - "font-primary": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif", - "line-height": { - "body": 1.7, - "heading": 1.3, - "page-title": 1.1 - }, - "responsive": { - "aligndefault-width": "610px", - "alignwide-width": "1240px" - }, - "spacing": { - "unit": "20px", - "horizontal": "25px", - "vertical": "30px" - }, - "border": { - "width": "3px" - } - - } - } - }, - "styles": { - "root": { - "color": { - "background": "var(--wp--preset--color--green)", - "text": "var(--wp--preset--color--dark-gray)", - "link": "var(--wp--preset--color--dark-gray)" - }, - "typography": { - "fontSize": "var(--wp--preset--font-size--normal)", - "lineHeight": "var(--wp--custom--line-height--body)" - } - }, - "core/heading/h1": { - "typography": { - "fontSize": "var(--wp--preset--font-size--gigantic)", - "lineHeight": "var(--wp--custom--line-height--page-title)" - } - }, - "core/heading/h2": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-large)", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - }, - "core/heading/h3": { - "typography": { - "fontSize": "calc(1.25 * var(--wp--preset--font-size--large))", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - }, - "core/heading/h4": { - "typography": { - "fontSize": "var(--wp--preset--font-size--large)", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - }, - "core/heading/h5": { - "typography": { - "fontSize": "var(--wp--preset--font-size--small)", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - }, - "core/heading/h6": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - }, - "core/site-tagline": { - "typography": { - "fontSize": "var(--wp--preset--font-size--small)", - "lineHeight": 1.4 - } - }, - "core/site-title": { - "typography": { - "fontSize": "var(--wp--preset--font-size--large)" - } - }, - "core/post-author": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--body)" - } - }, - "core/post-date": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--body)" - } - }, - "core/post-hierarchical-terms": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--body)" - } - }, - "core/post-tags": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--body)" - } - }, - "core/pullquote": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-large)", - "lineHeight": "var(--wp--custom--line-height--heading)" - }, - - "spacing": { - "padding": { - "top": "calc(2 * var(--wp--custom--spacing--unit))", - "bottom": "calc(2 * var(--wp--custom--spacing--unit))", - "left": "0", - "right": "0" - } - }, - "border": { - "radius": "0px", - "style": "solid", - "width": "var(--wp--custom--border--width)" - } - } - }, - "customTemplates": { - "page-home": { - "title": "Page without title" - } - } -} \ No newline at end of file diff --git a/tt1-blocks/theme.json b/tt1-blocks/theme.json index 91721c32..aa202a65 100644 --- a/tt1-blocks/theme.json +++ b/tt1-blocks/theme.json @@ -302,6 +302,25 @@ "lineHeight": "var(--wp--custom--line-height--body)" } }, + "core/pullquote": { + "typography": { + "fontSize": "var(--wp--preset--font-size--extra-large)", + "lineHeight": "var(--wp--custom--line-height--heading)" + }, + "spacing": { + "padding": { + "top": "calc(2 * var(--wp--custom--spacing--unit))", + "bottom": "calc(2 * var(--wp--custom--spacing--unit))", + "left": "0", + "right": "0" + } + }, + "border": { + "radius": "0px", + "style": "solid", + "width": "var(--wp--custom--border--width)" + } + }, "core/site-title": { "typography": { "fontSize": "var(--wp--preset--font-size--large)", From d1bae22c56399167a2900feff815a4e495ade92b Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Thu, 19 Aug 2021 11:51:25 -0400 Subject: [PATCH 3/5] Update theme.json --- tt1-blocks/theme.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tt1-blocks/theme.json b/tt1-blocks/theme.json index aa202a65..591a2095 100644 --- a/tt1-blocks/theme.json +++ b/tt1-blocks/theme.json @@ -303,10 +303,6 @@ } }, "core/pullquote": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-large)", - "lineHeight": "var(--wp--custom--line-height--heading)" - }, "spacing": { "padding": { "top": "calc(2 * var(--wp--custom--spacing--unit))", From dbbbdb4ce51c1245b9f57dd730bf1924c553495f Mon Sep 17 00:00:00 2001 From: Jason Crist Date: Thu, 19 Aug 2021 13:29:10 -0400 Subject: [PATCH 4/5] change pullquote border style to be top/bottom only --- tt1-blocks/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tt1-blocks/theme.json b/tt1-blocks/theme.json index 591a2095..cb5475eb 100644 --- a/tt1-blocks/theme.json +++ b/tt1-blocks/theme.json @@ -313,7 +313,7 @@ }, "border": { "radius": "0px", - "style": "solid", + "style": "solid none", "width": "var(--wp--custom--border--width)" } }, From 9789a9c1ca3804644c500b0e7424f9be4a1df3e6 Mon Sep 17 00:00:00 2001 From: Jason Crist Date: Thu, 19 Aug 2021 13:30:02 -0400 Subject: [PATCH 5/5] Apply typography styles to pullquote --- tt1-blocks/theme.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tt1-blocks/theme.json b/tt1-blocks/theme.json index cb5475eb..1ff515fa 100644 --- a/tt1-blocks/theme.json +++ b/tt1-blocks/theme.json @@ -303,6 +303,10 @@ } }, "core/pullquote": { + "typography": { + "fontSize": "var(--wp--preset--font-size--small)", + "fontWeight": "700" + }, "spacing": { "padding": { "top": "calc(2 * var(--wp--custom--spacing--unit))",