first commit
This commit is contained in:
88
wp-includes/blocks/paragraph/block.json
Normal file
88
wp-includes/blocks/paragraph/block.json
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "core/paragraph",
|
||||
"title": "Paragraph",
|
||||
"category": "text",
|
||||
"description": "Start with the basic building block of all narrative.",
|
||||
"keywords": [ "text" ],
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "p",
|
||||
"role": "content"
|
||||
},
|
||||
"dropCap": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"placeholder": {
|
||||
"type": "string"
|
||||
},
|
||||
"direction": {
|
||||
"type": "string",
|
||||
"enum": [ "ltr", "rtl" ]
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"align": [ "wide", "full" ],
|
||||
"splitting": true,
|
||||
"anchor": true,
|
||||
"className": false,
|
||||
"__experimentalBorder": {
|
||||
"color": true,
|
||||
"radius": true,
|
||||
"style": true,
|
||||
"width": true
|
||||
},
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true
|
||||
}
|
||||
},
|
||||
"spacing": {
|
||||
"margin": true,
|
||||
"padding": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"margin": false,
|
||||
"padding": false
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"textAlign": true,
|
||||
"textColumns": true,
|
||||
"textIndent": true,
|
||||
"__experimentalFontFamily": true,
|
||||
"__experimentalTextDecoration": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalLetterSpacing": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalWritingMode": true,
|
||||
"fitText": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"__experimentalSelector": "p",
|
||||
"__unstablePasteTextInline": true,
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"selectors": {
|
||||
"root": "p",
|
||||
"typography": {
|
||||
"textIndent": ".wp-block-paragraph + .wp-block-paragraph"
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-paragraph-editor",
|
||||
"style": "wp-block-paragraph"
|
||||
}
|
||||
25
wp-includes/blocks/paragraph/editor-rtl.css
Normal file
25
wp-includes/blocks/paragraph/editor-rtl.css
Normal file
@@ -0,0 +1,25 @@
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus {
|
||||
min-height: auto !important;
|
||||
}
|
||||
|
||||
.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.block-editor-block-list__block[data-empty=true] + .block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder] {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"],
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"] {
|
||||
rotate: 180deg;
|
||||
}
|
||||
|
||||
.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder] {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
||||
float: initial;
|
||||
margin-right: 0.1em;
|
||||
}
|
||||
1
wp-includes/blocks/paragraph/editor-rtl.min.css
vendored
Normal file
1
wp-includes/blocks/paragraph/editor-rtl.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus{min-height:auto!important}.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:1}.block-editor-block-list__block[data-empty=true]+.block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder]{opacity:0}.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"],.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg}.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:0}html[dir=rtl] .has-drop-cap:not(:focus):first-letter{float:none;margin-right:.1em}
|
||||
25
wp-includes/blocks/paragraph/editor.css
Normal file
25
wp-includes/blocks/paragraph/editor.css
Normal file
@@ -0,0 +1,25 @@
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus {
|
||||
min-height: auto !important;
|
||||
}
|
||||
|
||||
.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.block-editor-block-list__block[data-empty=true] + .block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder] {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"],
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"] {
|
||||
rotate: 180deg;
|
||||
}
|
||||
|
||||
.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder] {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
||||
float: initial;
|
||||
margin-left: 0.1em;
|
||||
}
|
||||
1
wp-includes/blocks/paragraph/editor.min.css
vendored
Normal file
1
wp-includes/blocks/paragraph/editor.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus{min-height:auto!important}.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:1}.block-editor-block-list__block[data-empty=true]+.block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder]{opacity:0}.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"],.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg}.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:0}html[dir=rtl] .has-drop-cap:not(:focus):first-letter{float:none;margin-left:.1em}
|
||||
92
wp-includes/blocks/paragraph/style-rtl.css
Normal file
92
wp-includes/blocks/paragraph/style-rtl.css
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Typography
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Radius scale.
|
||||
*/
|
||||
/**
|
||||
* Elevation scale.
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Mobile specific styles
|
||||
*/
|
||||
/**
|
||||
* Editor styles.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
.is-small-text {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
.is-regular-text {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.is-large-text {
|
||||
font-size: 2.25em;
|
||||
}
|
||||
|
||||
.is-larger-text {
|
||||
font-size: 3em;
|
||||
}
|
||||
|
||||
.has-drop-cap:not(:focus)::first-letter {
|
||||
float: right;
|
||||
font-size: 8.4em;
|
||||
line-height: 0.68;
|
||||
font-weight: 100;
|
||||
margin: 0.05em 0 0 0.1em;
|
||||
text-transform: uppercase;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body.rtl .has-drop-cap:not(:focus)::first-letter {
|
||||
float: initial;
|
||||
margin-right: 0.1em;
|
||||
}
|
||||
|
||||
p.has-drop-cap.has-background {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:root :where(p.has-background) {
|
||||
padding: 1.25em 2.375em;
|
||||
}
|
||||
|
||||
:where(p.has-text-color:not(.has-link-color)) a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
p.has-text-align-right[style*="writing-mode:vertical-rl"],
|
||||
p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
||||
rotate: 180deg;
|
||||
}
|
||||
1
wp-includes/blocks/paragraph/style-rtl.min.css
vendored
Normal file
1
wp-includes/blocks/paragraph/style-rtl.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.is-small-text{font-size:.875em}.is-regular-text{font-size:1em}.is-large-text{font-size:2.25em}.is-larger-text{font-size:3em}.has-drop-cap:not(:focus):first-letter{float:right;font-size:8.4em;font-style:normal;font-weight:100;line-height:.68;margin:.05em 0 0 .1em;text-transform:uppercase}body.rtl .has-drop-cap:not(:focus):first-letter{float:none;margin-right:.1em}p.has-drop-cap.has-background{overflow:hidden}:root :where(p.has-background){padding:1.25em 2.375em}:where(p.has-text-color:not(.has-link-color)) a{color:inherit}p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{rotate:180deg}
|
||||
92
wp-includes/blocks/paragraph/style.css
Normal file
92
wp-includes/blocks/paragraph/style.css
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Typography
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Radius scale.
|
||||
*/
|
||||
/**
|
||||
* Elevation scale.
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Mobile specific styles
|
||||
*/
|
||||
/**
|
||||
* Editor styles.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
.is-small-text {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
.is-regular-text {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.is-large-text {
|
||||
font-size: 2.25em;
|
||||
}
|
||||
|
||||
.is-larger-text {
|
||||
font-size: 3em;
|
||||
}
|
||||
|
||||
.has-drop-cap:not(:focus)::first-letter {
|
||||
float: left;
|
||||
font-size: 8.4em;
|
||||
line-height: 0.68;
|
||||
font-weight: 100;
|
||||
margin: 0.05em 0.1em 0 0;
|
||||
text-transform: uppercase;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body.rtl .has-drop-cap:not(:focus)::first-letter {
|
||||
float: initial;
|
||||
margin-left: 0.1em;
|
||||
}
|
||||
|
||||
p.has-drop-cap.has-background {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:root :where(p.has-background) {
|
||||
padding: 1.25em 2.375em;
|
||||
}
|
||||
|
||||
:where(p.has-text-color:not(.has-link-color)) a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
p.has-text-align-right[style*="writing-mode:vertical-rl"],
|
||||
p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
||||
rotate: 180deg;
|
||||
}
|
||||
1
wp-includes/blocks/paragraph/style.min.css
vendored
Normal file
1
wp-includes/blocks/paragraph/style.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.is-small-text{font-size:.875em}.is-regular-text{font-size:1em}.is-large-text{font-size:2.25em}.is-larger-text{font-size:3em}.has-drop-cap:not(:focus):first-letter{float:left;font-size:8.4em;font-style:normal;font-weight:100;line-height:.68;margin:.05em .1em 0 0;text-transform:uppercase}body.rtl .has-drop-cap:not(:focus):first-letter{float:none;margin-left:.1em}p.has-drop-cap.has-background{overflow:hidden}:root :where(p.has-background){padding:1.25em 2.375em}:where(p.has-text-color:not(.has-link-color)) a{color:inherit}p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{rotate:180deg}
|
||||
Reference in New Issue
Block a user