first commit
This commit is contained in:
+122
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* All of the CSS for your public-facing functionality should be
|
||||
* included in this file.
|
||||
*/
|
||||
/**
|
||||
* Environment for all styles (variables, additions, etc).
|
||||
*/
|
||||
/*--------------------------------------------------------------*/
|
||||
/*--------------------------------------------------------------*/
|
||||
.is-style-cnvs-heading-numbered {
|
||||
--cnvs-heading-numbered-background: #ced4da;
|
||||
--cnvs-heading-numbered-color: white;
|
||||
--cnvs-heading-numbered-border-radius: 50%;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
.editor-styles-wrapper {
|
||||
counter-reset: h2;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] {
|
||||
counter-increment: h2;
|
||||
counter-reset: h3;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] {
|
||||
counter-increment: h3;
|
||||
counter-reset: h4;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"] {
|
||||
counter-increment: h4;
|
||||
counter-reset: h5;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-5"] {
|
||||
counter-increment: h5;
|
||||
counter-reset: h6;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-6"] {
|
||||
counter-increment: h6;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .is-style-cnvs-heading-numbered:before {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"].is-style-cnvs-heading-numbered:before {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
float: right;
|
||||
height: 2.5rem;
|
||||
width: 2.5rem;
|
||||
border-radius: var(--cnvs-heading-numbered-border-radius);
|
||||
background: var(--cnvs-heading-numbered-background);
|
||||
color: var(--cnvs-heading-numbered-color);
|
||||
content: counter(h2);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* All of the CSS for your public-facing functionality should be
|
||||
* included in this file.
|
||||
*/
|
||||
/**
|
||||
* Environment for all styles (variables, additions, etc).
|
||||
*/
|
||||
/*--------------------------------------------------------------*/
|
||||
/*--------------------------------------------------------------*/
|
||||
.is-style-cnvs-heading-numbered {
|
||||
--cnvs-heading-numbered-background: #ced4da;
|
||||
--cnvs-heading-numbered-color: white;
|
||||
--cnvs-heading-numbered-border-radius: 50%;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
.editor-styles-wrapper {
|
||||
counter-reset: h2;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] {
|
||||
counter-increment: h2;
|
||||
counter-reset: h3;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] {
|
||||
counter-increment: h3;
|
||||
counter-reset: h4;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"] {
|
||||
counter-increment: h4;
|
||||
counter-reset: h5;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-5"] {
|
||||
counter-increment: h5;
|
||||
counter-reset: h6;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-6"] {
|
||||
counter-increment: h6;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .is-style-cnvs-heading-numbered:before {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"].is-style-cnvs-heading-numbered:before {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
float: left;
|
||||
height: 2.5rem;
|
||||
width: 2.5rem;
|
||||
border-radius: var(--cnvs-heading-numbered-border-radius);
|
||||
background: var(--cnvs-heading-numbered-background);
|
||||
color: var(--cnvs-heading-numbered-color);
|
||||
content: counter(h2);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block[data-heading="cnvs-heading-numbered-2"] ~ .wp-block[data-heading="cnvs-heading-numbered-3"] ~ .wp-block[data-heading="cnvs-heading-numbered-4"] ~ .wp-block[data-heading="cnvs-heading-numbered-5"] ~ .wp-block[data-heading="cnvs-heading-numbered-6"].is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* All of the CSS for your public-facing functionality should be
|
||||
* included in this file.
|
||||
*/
|
||||
/**
|
||||
* Environment for all styles (variables, additions, etc).
|
||||
*/
|
||||
/*--------------------------------------------------------------*/
|
||||
/*--------------------------------------------------------------*/
|
||||
.is-style-cnvs-heading-numbered {
|
||||
--cnvs-heading-numbered-background: #ced4da;
|
||||
--cnvs-heading-numbered-color: white;
|
||||
--cnvs-heading-numbered-border-radius: 50rem;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
.content,
|
||||
.entry-content {
|
||||
counter-reset: h2;
|
||||
}
|
||||
|
||||
.content h2,
|
||||
.entry-content h2 {
|
||||
counter-reset: h3;
|
||||
}
|
||||
|
||||
.content h3,
|
||||
.entry-content h3 {
|
||||
counter-reset: h4;
|
||||
}
|
||||
|
||||
.content h4,
|
||||
.entry-content h4 {
|
||||
counter-reset: h5;
|
||||
}
|
||||
|
||||
.content h5,
|
||||
.entry-content h5 {
|
||||
counter-reset: h6;
|
||||
}
|
||||
|
||||
.is-style-cnvs-heading-numbered {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.is-style-cnvs-heading-numbered:before {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered:before {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding-right: 0.15em;
|
||||
padding-left: 0.15em;
|
||||
height: 1.25em;
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 1.25em;
|
||||
flex: 0 0 1.25em;
|
||||
border-radius: var(--cnvs-heading-numbered-border-radius);
|
||||
background: var(--cnvs-heading-numbered-background);
|
||||
color: var(--cnvs-heading-numbered-color);
|
||||
counter-increment: h2;
|
||||
content: counter(h2);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h3;
|
||||
content: counter(h3);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3);
|
||||
}
|
||||
|
||||
h4.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h4;
|
||||
content: counter(h4);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
h5.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h5;
|
||||
content: counter(h5);
|
||||
}
|
||||
|
||||
h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
h6.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h6;
|
||||
content: counter(h6);
|
||||
}
|
||||
|
||||
h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* All of the CSS for your public-facing functionality should be
|
||||
* included in this file.
|
||||
*/
|
||||
/**
|
||||
* Environment for all styles (variables, additions, etc).
|
||||
*/
|
||||
/*--------------------------------------------------------------*/
|
||||
/*--------------------------------------------------------------*/
|
||||
.is-style-cnvs-heading-numbered {
|
||||
--cnvs-heading-numbered-background: #ced4da;
|
||||
--cnvs-heading-numbered-color: white;
|
||||
--cnvs-heading-numbered-border-radius: 50rem;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
.content,
|
||||
.entry-content {
|
||||
counter-reset: h2;
|
||||
}
|
||||
|
||||
.content h2,
|
||||
.entry-content h2 {
|
||||
counter-reset: h3;
|
||||
}
|
||||
|
||||
.content h3,
|
||||
.entry-content h3 {
|
||||
counter-reset: h4;
|
||||
}
|
||||
|
||||
.content h4,
|
||||
.entry-content h4 {
|
||||
counter-reset: h5;
|
||||
}
|
||||
|
||||
.content h5,
|
||||
.entry-content h5 {
|
||||
counter-reset: h6;
|
||||
}
|
||||
|
||||
.is-style-cnvs-heading-numbered {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.is-style-cnvs-heading-numbered:before {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered:before {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding-left: 0.15em;
|
||||
padding-right: 0.15em;
|
||||
height: 1.25em;
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 1.25em;
|
||||
flex: 0 0 1.25em;
|
||||
border-radius: var(--cnvs-heading-numbered-border-radius);
|
||||
background: var(--cnvs-heading-numbered-background);
|
||||
color: var(--cnvs-heading-numbered-color);
|
||||
counter-increment: h2;
|
||||
content: counter(h2);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h3;
|
||||
content: counter(h3);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3);
|
||||
}
|
||||
|
||||
h4.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h4;
|
||||
content: counter(h4);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4);
|
||||
}
|
||||
|
||||
h5.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h5;
|
||||
content: counter(h5);
|
||||
}
|
||||
|
||||
h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5);
|
||||
}
|
||||
|
||||
h6.is-style-cnvs-heading-numbered:before {
|
||||
counter-increment: h6;
|
||||
content: counter(h6);
|
||||
}
|
||||
|
||||
h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
|
||||
h2.is-style-cnvs-heading-numbered ~ h3.is-style-cnvs-heading-numbered ~ h4.is-style-cnvs-heading-numbered ~ h5.is-style-cnvs-heading-numbered ~ h6.is-style-cnvs-heading-numbered:before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=94)}({1:function(e,t,r){var n;
|
||||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var u in n)r.call(n,u)&&n[u]&&e.push(u);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},94:function(e,t,r){e.exports=r(95)},95:function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var a=wp.i18n.__,u=wp.blocks.registerBlockStyle,c=wp.hooks.addFilter,l=wp.compose.createHigherOrderComponent;u("core/heading",{name:"cnvs-heading-numbered",label:a("Numbered")}),c("editor.BlockListBlock","canvas/heading/numberedAdditionalAttributes",l((function(e){return function(t){var r=t.attributes,n=t.name,a=r.level,u=r.className;return"core/heading"===n&&/is-style-cnvs-heading-numbered/.test(u)?(u=o()(u,"cnvs-heading-numbered-".concat(a)),wp.element.createElement(e,i({},t,{className:u,wrapperProps:{"data-heading":"cnvs-heading-numbered-".concat(a)}}))):wp.element.createElement(e,t)}}),"canvasHeadingNumberedAdditionalAttributes"))}});
|
||||
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import classnames from 'classnames';
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
const {
|
||||
__,
|
||||
} = wp.i18n;
|
||||
|
||||
const {
|
||||
registerBlockStyle,
|
||||
} = wp.blocks;
|
||||
|
||||
const {
|
||||
addFilter,
|
||||
} = wp.hooks;
|
||||
|
||||
const {
|
||||
createHigherOrderComponent,
|
||||
} = wp.compose;
|
||||
|
||||
registerBlockStyle( 'core/heading', {
|
||||
name: 'cnvs-heading-numbered',
|
||||
label: __( 'Numbered' ),
|
||||
} );
|
||||
|
||||
const canvasHeadingNumberedAdditionalAttributes = createHigherOrderComponent( ( BlockListBlock ) => {
|
||||
return ( props ) => {
|
||||
const {
|
||||
attributes,
|
||||
name,
|
||||
} = props;
|
||||
|
||||
const {
|
||||
level,
|
||||
} = attributes;
|
||||
|
||||
let {
|
||||
className,
|
||||
} = attributes;
|
||||
|
||||
if ( 'core/heading' !== name || ! /is-style-cnvs-heading-numbered/.test( className ) ) {
|
||||
return <BlockListBlock { ...props } />;
|
||||
}
|
||||
|
||||
className = classnames(
|
||||
className,
|
||||
`cnvs-heading-numbered-${ level }`
|
||||
);
|
||||
|
||||
return (
|
||||
<BlockListBlock
|
||||
{ ...props }
|
||||
className={ className }
|
||||
wrapperProps={{ 'data-heading': `cnvs-heading-numbered-${ level }` }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
}, 'canvasHeadingNumberedAdditionalAttributes' );
|
||||
|
||||
addFilter( 'editor.BlockListBlock', 'canvas/heading/numberedAdditionalAttributes', canvasHeadingNumberedAdditionalAttributes );
|
||||
Reference in New Issue
Block a user