{"id":928,"date":"2018-09-21T17:48:30","date_gmt":"2018-09-21T17:48:30","guid":{"rendered":"https:\/\/gpsites.co\/volume\/?p=928"},"modified":"2018-09-21T17:48:30","modified_gmt":"2018-09-21T17:48:30","slug":"css-styling","status":"publish","type":"post","link":"https:\/\/richruns.co.uk\/css-styling\/","title":{"rendered":"CSS Styling"},"content":{"rendered":"\n
In Comparison to the original Volume which required over 350 lines of CSS, Volume remastered uses less that 50. But why do we need CSS when Blocks does it all? I hear you ask. Well there are somethings that i just like to tweak and sometimes a little CSS is required.<\/p>\n\n\n\n
The CSS added to the Site can be found in Customizer > Additional CSS. Lets take a closer look at what each of them does<\/p>\n\n\n\n
the default behaviour of the Post Navigation Block Element is to display a 50\/50 row showing the previous and next post. The following CSS removes the empty space when a user is on the first or last post so the block spans the full width.<\/p>\n\n\n\n
\/* Custom Post Navigation remove empty classes *\/\n.featured-navigation .gb-grid-column:empty {\n flex: 0 1;\n}\n\n@media(min-width: 769px) {\n .featured-navigation .gb-grid-column:not(:empty) {\n flex: 1 0;\n }\n}<\/code><\/pre>\n\n\n\nSingle Post Featured Images<\/h2>\n\n\n\n
the following CSS adjusts the featured image background size for tablet, and removes it from Mobile<\/p>\n\n\n\n
\/* Single Post Hero image responsive controls *\/\n@media(max-width: 1024px) and (min-width: 769px) {\n .page-hero-block:before {\n background-size: cover;\n }\n .featured-column,\n .featured-column img.wp-post-image {\n width: 100% !important;\n }\n}\n\n@media(max-width: 768px) {\n .page-hero-block:before {\n background: none;\n }\n}<\/code><\/pre>\n\n\n\nPost Archives align meta to bottom of post<\/h2>\n\n\n\n
A simple flex box CSS to push the last element in the post-summary ( the post meta ) to align vertically at the bottom of the post.<\/p>\n\n\n\n
\/* Post Archives - force post meta to vertically align bottom *\/\n.generate-columns-container .post>.gb-container,\n.generate-columns-container .post>.gb-container>.gb-inside-container,\n.post-summary>.gb-inside-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.post-summary {\n flex: 1;\n}\n\n.post-summary>.gb-inside-container>*:last-child {\n margin-top: auto;\n}<\/code><\/pre>\n\n\n\nBorder radius on post archive images<\/h2>\n\n\n\n\/* Add border radius to post archive images *\/\n.generate-columns-container .dynamic-featured-image {\n border-radius: 4px;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"It wouldn’t be a FlintSkin site without a little CSS… and i mean a very little CSS.<\/p>\n","protected":false},"author":1,"featured_media":1200,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/posts\/928"}],"collection":[{"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/comments?post=928"}],"version-history":[{"count":0,"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/posts\/928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/media\/1200"}],"wp:attachment":[{"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/media?parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/categories?post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/richruns.co.uk\/wp-json\/wp\/v2\/tags?post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}