Customize: Maximize height of Custom CSS `textarea` without causing doubled scrollbars.

Textarea will fill vertical height of Custom CSS section for browsers that support `calc()` and when plugins don't add other controls to the section. Also run CSS autoprefixer.

Props michaelarestad, westonruter.
See #35395.
Fixes #38755.

Built from https://develop.svn.wordpress.org/trunk@39229


git-svn-id: http://core.svn.wordpress.org/trunk@39169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-11-14 19:12:30 +00:00
parent 05a9259cc5
commit 9daebf050a
9 changed files with 85 additions and 51 deletions

View File

@ -1135,40 +1135,54 @@ p.customize-section-description {
/**
* Custom CSS Section
*
* Modifications to the Section Container to
* make the textarea full-width.
* Modifications to the Section Container to make the textarea full-width and
* full-height, if the control is the only control in the section.
*/
#customize-theme-controls #sub-accordion-section-custom_css {
padding-right: 0;
padding-left: 0;
}
#customize-theme-controls #sub-accordion-section-custom_css .customize-section-title {
margin-right: 0;
}
#customize-theme-controls #sub-accordion-section-custom_css .customize-control-title,
#customize-theme-controls #sub-accordion-section-custom_css .notice {
margin-right: 10px;
margin-left: 10px;
}
#customize-theme-controls #sub-accordion-section-custom_css textarea {
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
#customize-controls .customize-section-description-container.section-meta.customize-info {
border-bottom: none;
}
#sub-accordion-section-custom_css .customize-control-notifications-container {
margin-bottom: 15px;
}
#sub-accordion-section-custom_css textarea {
border-left: 0;
border-right: 0;
#customize-control-custom_css textarea {
display: block;
font-family: Consolas, Monaco, monospace;
font-size: 12px;
padding: 6px 8px;
height: 553px;
height: 500px;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
}
.customize-section-description-container + #customize-control-custom_css:last-child textarea {
border-left: 0;
border-right: 0;
height: -webkit-calc( 100vh - 185px );
height: calc( 100vh - 185px );
resize: none;
}
.customize-section-description-container + #customize-control-custom_css:last-child {
margin-right: -12px;
width: 299px;
margin-bottom: -12px;
}
@media screen and ( max-width: 640px ) {
.customize-section-description-container + #customize-control-custom_css:last-child {
margin-right: 0;
margin-left: 0;
width: 100%;
}
.customize-section-description-container + #customize-control-custom_css:last-child textarea {
height: -webkit-calc( 100vh - 140px );
height: calc( 100vh - 140px );
width: 100%;
border: solid 1px #ddd;
}
}
/**

File diff suppressed because one or more lines are too long

View File

@ -1135,40 +1135,54 @@ p.customize-section-description {
/**
* Custom CSS Section
*
* Modifications to the Section Container to
* make the textarea full-width.
* Modifications to the Section Container to make the textarea full-width and
* full-height, if the control is the only control in the section.
*/
#customize-theme-controls #sub-accordion-section-custom_css {
padding-left: 0;
padding-right: 0;
}
#customize-theme-controls #sub-accordion-section-custom_css .customize-section-title {
margin-left: 0;
}
#customize-theme-controls #sub-accordion-section-custom_css .customize-control-title,
#customize-theme-controls #sub-accordion-section-custom_css .notice {
margin-left: 10px;
margin-right: 10px;
}
#customize-theme-controls #sub-accordion-section-custom_css textarea {
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
#customize-controls .customize-section-description-container.section-meta.customize-info {
border-bottom: none;
}
#sub-accordion-section-custom_css .customize-control-notifications-container {
margin-bottom: 15px;
}
#sub-accordion-section-custom_css textarea {
border-right: 0;
border-left: 0;
#customize-control-custom_css textarea {
display: block;
font-family: Consolas, Monaco, monospace;
font-size: 12px;
padding: 6px 8px;
height: 553px;
height: 500px;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
}
.customize-section-description-container + #customize-control-custom_css:last-child textarea {
border-right: 0;
border-left: 0;
height: -webkit-calc( 100vh - 185px );
height: calc( 100vh - 185px );
resize: none;
}
.customize-section-description-container + #customize-control-custom_css:last-child {
margin-left: -12px;
width: 299px;
margin-bottom: -12px;
}
@media screen and ( max-width: 640px ) {
.customize-section-description-container + #customize-control-custom_css:last-child {
margin-left: 0;
margin-right: 0;
width: 100%;
}
.customize-section-description-container + #customize-control-custom_css:last-child textarea {
height: -webkit-calc( 100vh - 140px );
height: calc( 100vh - 140px );
width: 100%;
border: solid 1px #ddd;
}
}
/**

File diff suppressed because one or more lines are too long

View File

@ -55,6 +55,8 @@
box-shadow: 0 2px 1px rgba(46,68,83,0.15);
text-align: center;
cursor: pointer;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 3px;
-webkit-animation-fill-mode: both;
@ -86,6 +88,7 @@
}
.customize-partial-edit-shortcut button:focus {
-webkit-box-shadow: 0 0 0 2px #008ec2;
box-shadow: 0 0 0 2px #008ec2;
}

File diff suppressed because one or more lines are too long

View File

@ -55,6 +55,8 @@
box-shadow: 0 2px 1px rgba(46,68,83,0.15);
text-align: center;
cursor: pointer;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 3px;
-webkit-animation-fill-mode: both;
@ -86,6 +88,7 @@
}
.customize-partial-edit-shortcut button:focus {
-webkit-box-shadow: 0 0 0 2px #008ec2;
box-shadow: 0 0 0 2px #008ec2;
}

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-beta3-39228';
$wp_version = '4.7-beta3-39229';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.