diff --git a/src/blog/posts/2024-07-23-responsive-disability-pride-flag-css.md b/src/blog/posts/2024-07-23-responsive-disability-pride-flag-css.md index 8fccaea1..95bcbb3a 100644 --- a/src/blog/posts/2024-07-23-responsive-disability-pride-flag-css.md +++ b/src/blog/posts/2024-07-23-responsive-disability-pride-flag-css.md @@ -6,8 +6,9 @@ updated: 2024-12-15T18:43:47+0800 categories: ["css", "disability pride"] --- -{%- css %} -.disability-pride-flag { +{% set demoHeight = "23rem" %} + +{% set disabilityPrideCss %}.disability-pride-flag { background: linear-gradient( 37deg, @@ -19,12 +20,11 @@ categories: ["css", "disability pride"] #3BB07D 30% 65%, #595959 0 ); -} +}{% endset %} -.disability-pride-flag.demo { - width: 100%; - height: 20rem; -} +{%- css %} +{{ disabilityPrideCss }} +.disability-pride-flag.demo { height: {{ demoHeight }}; } {% endcss %}
@@ -36,23 +36,13 @@ My Disability Pride flag CSS background is done with a combination of the CSS [` Here is the CSS snippet for a responsive Disability Pride Flag background: ```css -.disability-pride-flag { - background: - linear-gradient( - 37deg, - #595959 0 35%, - #CF7280 30% 41%, - #EEDE77 30% 47%, - #E8E8E8 30% 53%, - #7bc2e0 30% 59%, - #3BB07D 30% 65%, - #595959 0 - ); -} +{{ disabilityPrideCss }} ``` After copying the above snippet in a CSS stylesheet or the HTML `