Update block canvas styles (#6640)

* update link styles

* update typography

* update spacing

* add text underline offset and thickness
This commit is contained in:
Madhu Dollu 2022-10-04 21:06:54 +05:30 committed by GitHub
parent 6ca9a84f12
commit adde57eda2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 177 additions and 65 deletions

View file

@ -1,11 +1 @@
<!-- wp:group {"layout":{"inherit":true}} --> <!-- wp:pattern {"slug":"block-canvas/footer"} /-->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"padding":{"top":"80px","bottom":"30px"}}}} -->
<div class="wp-block-group" style="padding-top:80px;padding-bottom:30px">
<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

View file

@ -1,29 +1,22 @@
<!-- wp:group {"layout":{"inherit":"true"}} --> <!-- wp:group {"layout":{"inherit":"true"}} -->
<div class="wp-block-group"> <div class="wp-block-group">
<!-- wp:group {"align":"full","layout":{"type":"flex","justifyContent":"space-between"},"style":{"spacing":{"padding":{"bottom":"var(--wp--preset--spacing--50)","top":"var(--wp--preset--spacing--50)"}}}} --> <!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var:preset|spacing|60","top":"var:preset|spacing|60","right":"var:preset|spacing|40","left":"var:preset|spacing|40"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignfull" style="padding-bottom:var(--wp--preset--spacing--50);padding-top:var(--wp--preset--spacing--50)"> <div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--40)"><!-- wp:group {"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:site-logo {"width":64} /-->
<!-- wp:group {"layout":{"type":"flex"}} --> <!-- wp:group {"style":{"spacing":{"blockGap":"0px"}}} -->
<div class="wp-block-group"> <div class="wp-block-group"><!-- wp:site-title /-->
<!-- wp:site-logo {"width":64} /-->
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}}} --> <!-- wp:site-tagline /--></div>
<div class="wp-block-group"> <!-- /wp:group --></div>
<!-- wp:site-title /--> <!-- /wp:group -->
<!-- wp:site-tagline /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
<!-- wp:navigation {"__unstableLocation":"primary","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"}}}} /--> <!-- wp:navigation {"__unstableLocation":"primary","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"}}}} /--></div>
</div>
<!-- /wp:group --> <!-- /wp:group -->
</div> </div>
<!-- /wp:group --> <!-- /wp:group -->
<!-- wp:spacer {"height":"var(--wp--preset--spacing--60)"} --> <!-- wp:spacer {"height":"var(--wp--preset--spacing--80)"} -->
<div style="height:var(--wp--preset--spacing--60)" aria-hidden="true" class="wp-block-spacer"></div> <div style="height:var(--wp--preset--spacing--80)" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --> <!-- /wp:spacer -->

View file

@ -2,10 +2,10 @@
<div class="wp-block-group"> <div class="wp-block-group">
<!-- wp:group {"layout":{"type":"flex"}} --> <!-- wp:group {"layout":{"type":"flex"}} -->
<div class="wp-block-group"> <div class="wp-block-group">
<!-- wp:post-author {"showAvatar":false,"showBio":false,"style":{"typography":{"fontSize":"14px"}}} /--> <!-- wp:post-author-name {"isLink":true,"fontSize":"small"} /-->
<!-- wp:post-date {"isLink":true,"style":{"typography":{"fontSize":"14px"}}} /--> <!-- wp:post-date {"isLink":true,"fontSize":"small"} /-->
<!-- wp:post-terms {"term":"category","style":{"typography":{"fontSize":"14px"}}} /--> <!-- wp:post-terms {"term":"category","fontSize":"small"} /-->
<!-- wp:post-terms {"term": "post_tag","style":{"typography":{"fontSize":"14px"}}} /--> <!-- wp:post-terms {"term": "post_tag","fontSize":"small"} /-->
</div> </div>
<!-- /wp:group --> <!-- /wp:group -->
</div> </div>

View file

@ -0,0 +1,33 @@
<?php
/**
* Title: Default footer
* Slug: block-canvas/footer
* Categories: footer
* Block Types: core/template-part/footer
*/
?>
<!-- wp:spacer {"height":"var(--wp--preset--spacing--80)"} -->
<div style="height:var(--wp--preset--spacing--80)" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var(--wp--preset--spacing--60)","bottom":"var(--wp--preset--spacing--60)"}}}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">
<?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'block-canvas' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Proudly Powered by %1$s', 'block-canvas' ),
$wordpress_link
);
?>
</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

View file

@ -1,6 +1,6 @@
=== Block Canvas === === Block Canvas ===
Contributors: Automattic Contributors: Automattic
Requires at least: 5.8 Requires at least: 6.0
Tested up to: 6.0 Tested up to: 6.0
Requires PHP: 5.7 Requires PHP: 5.7
License: GPLv2 or later License: GPLv2 or later

View file

@ -4,7 +4,7 @@ Theme URI: https://github.com/Automattic/themes/tree/trunk/block-canvas
Author: Automattic Author: Automattic
Author URI: https://automattic.com/ Author URI: https://automattic.com/
Description: Block Canvas is a simple theme that supports full-site editing. It comes with a set of minimal templates and design settings that can be manipulated through Global Styles. Use it to build something beautiful. Description: Block Canvas is a simple theme that supports full-site editing. It comes with a set of minimal templates and design settings that can be manipulated through Global Styles. Use it to build something beautiful.
Requires at least: 5.7 Requires at least: 6.0
Tested up to: 6.0 Tested up to: 6.0
Requires PHP: 5.7 Requires PHP: 5.7
Version: 0.0.17 Version: 0.0.17
@ -80,4 +80,12 @@ GNU General Public License for more details.
.wp-block-table figcaption { .wp-block-table figcaption {
font-size: var(--wp--preset--font-size--small); font-size: var(--wp--preset--font-size--small);
text-align: center; text-align: center;
} }
/*
* Link styles
*/
a {
text-decoration-thickness: .0625em !important;
text-underline-offset: .15em
}

View file

@ -17,7 +17,7 @@
"color": { "color": {
"palette": [ "palette": [
{ {
"color": "#007cba", "color": "#000000",
"name": "Primary", "name": "Primary",
"slug": "primary" "slug": "primary"
}, },
@ -68,8 +68,12 @@
], ],
"fontSizes": [ "fontSizes": [
{ {
"fluid": {
"min": "0.825rem",
"max": "1.0625rem"
},
"name": "Small", "name": "Small",
"size": "0.825rem", "size": "1rem",
"slug": "small" "slug": "small"
}, },
{ {
@ -82,14 +86,18 @@
"slug": "medium" "slug": "medium"
}, },
{ {
"fluid": false, "fluid": {
"min": "1.75rem",
"max": "2rem"
},
"name": "Large", "name": "Large",
"size": "1.75rem", "size": "1.75rem",
"slug": "large" "slug": "large"
}, },
{ {
"fluid": { "fluid": {
"max": "4rem" "min": "2.5rem",
"max": "3rem"
}, },
"name": "Extra Large", "name": "Extra Large",
"size": "3rem", "size": "3rem",
@ -102,8 +110,8 @@
"blocks": { "blocks": {
"core/code": { "core/code": {
"border": { "border": {
"color": "#CCCCCC", "color": "var(--wp--preset--color--foreground)",
"radius": "0px", "radius": "0.25rem",
"style": "solid", "style": "solid",
"width": "2px" "width": "2px"
}, },
@ -136,13 +144,7 @@
}, },
"core/comment-reply-link": { "core/comment-reply-link": {
"typography": { "typography": {
"fontSize": "var(--wp--preset--font-size--small)", "fontSize": "var(--wp--preset--font-size--small)"
"textDecoration": "underline"
}
},
"core/comments-title": {
"typography": {
"fontSize": "var(--wp--preset--font-size--large)"
} }
}, },
"core/gallery": { "core/gallery": {
@ -159,12 +161,52 @@
} }
} }
}, },
"core/navigation": {
"elements": {
"link": {
"typography": {
"textDecoration": "none"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
}
}
}
},
"core/post-author-name": {
"elements": {
"link": {
"typography": {
"textDecoration": "none"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
}
}
}
},
"core/post-date": { "core/post-date": {
"color": { "color": {
"text": "var(--wp--preset--color--foreground)" "text": "var(--wp--preset--color--foreground)"
}, },
"typography": { "typography": {
"fontSize": "var(--wp--preset--font-size--small)" "fontSize": "var(--wp--preset--font-size--small)"
},
"elements": {
"link": {
"typography": {
"textDecoration": "none"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
}
}
} }
}, },
"core/post-title": { "core/post-title": {
@ -172,10 +214,23 @@
"margin": { "margin": {
"bottom": "0" "bottom": "0"
} }
},
"elements": {
"link": {
"typography": {
"textDecoration": "none"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
}
}
} }
}, },
"core/pullquote": { "core/pullquote": {
"border": { "border": {
"color": "var(--wp--preset--color--foreground)",
"style": "solid", "style": "solid",
"width": "1px 0" "width": "1px 0"
}, },
@ -231,8 +286,19 @@
"core/site-title": { "core/site-title": {
"typography": { "typography": {
"fontSize": "var(--wp--preset--font-size--medium)", "fontSize": "var(--wp--preset--font-size--medium)",
"fontWeight": "700", "fontWeight": "700"
"textDecoration": "none" },
"elements": {
"link": {
"typography": {
"textDecoration": "none"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
}
}
} }
} }
}, },
@ -242,51 +308,68 @@
}, },
"elements": { "elements": {
"button": { "button": {
":hover": { "border": {
"radius": "0.25rem"
},
"color": {
"background": "var(--wp--preset--color--primary)",
"text": "var(--wp--preset--color--background)"
},
":hover": {
"color": { "color": {
"background": "var(--wp--preset--color--secondary)", "background": "var(--wp--preset--color--secondary)",
"text": "var(--wp--preset--color--background)" "text": "var(--wp--preset--color--background)"
} }
}, },
"border": { ":active": {
"radius": "0" "color": {
}, "background": "var(--wp--preset--color--primary)",
"color": { "text": "var(--wp--preset--color--background)"
"background": "var(--wp--preset--color--primary)", }
"text": "var(--wp--preset--color--background)" },
} ":focus": {
"color": {
"background": "var(--wp--preset--color--primary)",
"text": "var(--wp--preset--color--background)"
},
"outline": {
"color": "var(--wp--preset--color--primary)",
"offset": "2px",
"style": "dotted",
"width": "1px"
}
}
}, },
"heading": { "heading": {
"typography": { "typography": {
"fontFamily": "var(--wp--preset--font-family--rubik)", "fontFamily": "var(--wp--preset--font-family--rubik)",
"textTransform": "uppercase",
"fontWeight": "400", "fontWeight": "400",
"lineHeight": "1.125" "lineHeight": "1.125"
} }
}, },
"h1": { "h1": {
"typography": { "typography": {
"fontSize": "3rem" "fontSize": "var(--wp--preset--font-size--x-large)"
} }
}, },
"h2": { "h2": {
"typography": { "typography": {
"fontSize": "var(--wp--preset--font-size--x-large)" "fontSize": "var(--wp--preset--font-size--large)"
} }
}, },
"h3": { "h3": {
"typography": { "typography": {
"fontSize": "var(--wp--preset--font-size--large)" "fontSize": "clamp(1.5rem, calc(1.5rem + ((1vw - 0.48rem) * 0.4808)), 1.75rem)"
} }
}, },
"h4": { "h4": {
"typography": { "typography": {
"fontSize": "var(--wp--preset--font-size--medium)" "fontSize": "clamp(1.25rem, calc(1.25rem + ((1vw - 0.48rem) * 0.4808)), 1.5rem)"
} }
}, },
"h5": { "h5": {
"typography": { "typography": {
"fontSize": "1.125rem" "fontSize": "var(--wp--preset--font-size--medium)"
} }
}, },
"h6": { "h6": {
@ -297,6 +380,11 @@
"link": { "link": {
"color": { "color": {
"text": "var(--wp--preset--color--primary)" "text": "var(--wp--preset--color--primary)"
},
":hover": {
"typography": {
"textDecoration": "none"
}
} }
} }
}, },