Skip to content

Commit fb37359

Browse files
committed
Administration: CSS coding standards
- properties should be followed by a colon and a space - media queries shouldn't use spaces within parenthesis - indentation should use tabs instead of spaces or mixed spaces / tabs - the content property should use double quotes - no double spaces Props nadim0988, afercia. Fixes #45185. git-svn-id: https://develop.svn.wordpress.org/trunk@44637 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 15f4df2 commit fb37359

28 files changed

Lines changed: 157 additions & 152 deletions

src/wp-admin/css/about.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@
6464
position: absolute;
6565
bottom: 0;
6666
width: 100%;
67-
padding: 40px 10px 15px;
68-
overflow: auto;
69-
box-sizing: border-box;
70-
background: linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 60%,transparent);
71-
font-weight: 600;
72-
text-shadow: 0px 0px 5px rgba(0,0,0,.75);
67+
padding: 40px 10px 15px;
68+
overflow: auto;
69+
box-sizing: border-box;
70+
background: linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 60%,transparent);
71+
font-weight: 600;
72+
text-shadow: 0px 0px 5px rgba(0,0,0,.75);
7373
}
7474

7575
.about-wrap .jetpack-video-wrapper {
@@ -160,8 +160,8 @@
160160
}
161161

162162
.about-wrap figcaption {
163-
font-size: 13px;
164-
text-align: center;
163+
font-size: 13px;
164+
text-align: center;
165165
color: white;
166166
text-overflow: ellipsis;
167167
}

src/wp-admin/css/admin-menu.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ li#wp-admin-bar-menu-toggle {
742742

743743
}
744744

745-
@media screen and ( max-width: 782px ) {
745+
@media screen and (max-width: 782px) {
746746
.auto-fold #wpcontent {
747747
position: relative;
748748
margin-left: 0;

src/wp-admin/css/code-editor.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@
7171
text-align: left;
7272
}
7373

74-
.wrap .CodeMirror .CodeMirror-linenumber {
75-
color: #666;
74+
.wrap .CodeMirror .CodeMirror-linenumber {
75+
color: #666;
7676
}

src/wp-admin/css/color-picker.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
.wp-picker-input-wrap .button,
7272
.wp-customizer .wp-picker-input-wrap .button {
73-
margin-left: 6px;
73+
margin-left: 6px;
7474
}
7575

7676
.wp-picker-container .iris-square-slider .ui-slider-handle:focus {
@@ -125,7 +125,7 @@
125125
0 0 2px 1px rgba(30, 140, 190, .8);
126126
}
127127

128-
@media screen and ( max-width: 782px ) {
128+
@media screen and (max-width: 782px) {
129129
.wp-picker-container input[type="text"].wp-color-picker {
130130
width: 80px;
131131
padding: 6px 5px 5px;
@@ -160,7 +160,7 @@
160160
}
161161
}
162162

163-
@media screen and ( max-width: 640px ) {
163+
@media screen and (max-width: 640px) {
164164
.wp-customizer .wp-picker-container .wp-color-result.button {
165165
font-size: 14px;
166166
line-height: 29px;

src/wp-admin/css/common.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,8 +1538,8 @@ div.error {
15381538

15391539
/* Error icon. */
15401540
.update-message.notice-error p:before {
1541-
color: #dc3232;
1542-
content: "\f534";
1541+
color: #dc3232;
1542+
content: "\f534";
15431543
}
15441544

15451545
.wrap .notice p:before,
@@ -1749,7 +1749,7 @@ form.upgrade .hint {
17491749
#contextual-help-wrap h5 {
17501750
margin: 0;
17511751
padding: 8px 0;
1752-
font-size: 13px;
1752+
font-size: 13px;
17531753
font-weight: 600;
17541754
}
17551755

@@ -1991,7 +1991,7 @@ html.wp-toolbar {
19911991
width: 200px;
19921992
text-align: center;
19931993
color: #ccc;
1994-
font-size:18px;
1994+
font-size: 18px;
19951995
display: none;
19961996
}
19971997

@@ -2223,10 +2223,10 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
22232223

22242224
/* Back-compat for plugins. Deprecated. Use .wp-clearfix instead. */
22252225
.nav-tab-wrapper:not(.wp-clearfix):after {
2226-
content: "";
2227-
display: table;
2228-
clear: both;
2229-
}
2226+
content: "";
2227+
display: table;
2228+
clear: both;
2229+
}
22302230

22312231
.ie8 .nav-tab-wrapper {
22322232
/* contain floats establishing a new block formatting context */
@@ -2875,7 +2875,7 @@ div.action-links {
28752875
margin-right: 1em;
28762876
}
28772877

2878-
@media screen and ( max-width: 771px ) {
2878+
@media screen and (max-width: 771px) {
28792879
#plugin-information-title.with-banner {
28802880
height: 100px;
28812881
}
@@ -2992,7 +2992,7 @@ div.action-links {
29922992
}
29932993

29942994
/* move plugin install close icon to top on narrow screens */
2995-
@media screen and ( max-width: 830px ) {
2995+
@media screen and (max-width: 830px) {
29962996
.plugin-details-modal #TB_closeWindowButton {
29972997
right: 0;
29982998
top: -30px;
@@ -3388,7 +3388,7 @@ img {
33883388
#customize-info.open .accordion-section-title:after,
33893389
.nav-menus-php .menu-item-edit-active .item-edit:before,
33903390
.widget.open .widget-top .widget-action .toggle-indicator:before,
3391-
.widget.widget-in-question .widget-top .widget-action .toggle-indicator:before {
3391+
.widget.widget-in-question .widget-top .widget-action .toggle-indicator:before {
33923392
content: "\f142";
33933393
}
33943394

@@ -3681,7 +3681,7 @@ img {
36813681
width: device-width;
36823682
}
36833683

3684-
@media screen and ( max-width: 782px ) {
3684+
@media screen and (max-width: 782px) {
36853685
html.wp-toolbar {
36863686
padding-top: 46px;
36873687
}

src/wp-admin/css/customize-controls.css

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,10 @@ body.trashing #publish-settings {
533533
background-color: #fff;
534534
border-bottom: 1px solid #ddd;
535535
border-left: 4px solid #fff;
536-
transition: .15s color ease-in-out,
537-
.15s background-color ease-in-out,
538-
.15s border-color ease-in-out;
536+
transition:
537+
.15s color ease-in-out,
538+
.15s background-color ease-in-out,
539+
.15s border-color ease-in-out;
539540
}
540541

541542
#customize-controls #customize-theme-controls .customize-themes-panel .accordion-section-title {
@@ -785,9 +786,10 @@ h3.customize-section-title {
785786
color: #444;
786787
text-align: left;
787788
cursor: pointer;
788-
transition: color .15s ease-in-out,
789-
border-color .15s ease-in-out,
790-
background .15s ease-in-out;
789+
transition:
790+
color .15s ease-in-out,
791+
border-color .15s ease-in-out,
792+
background .15s ease-in-out;
791793
box-sizing: content-box;
792794
}
793795

@@ -805,9 +807,10 @@ h3.customize-section-title {
805807
border-left: 4px solid #fff;
806808
box-shadow: none;
807809
cursor: pointer;
808-
transition: color .15s ease-in-out,
809-
border-color .15s ease-in-out,
810-
background .15s ease-in-out;
810+
transition:
811+
color .15s ease-in-out,
812+
border-color .15s ease-in-out,
813+
background .15s ease-in-out;
811814
}
812815

813816
.customize-section-back {
@@ -1624,7 +1627,7 @@ p.customize-section-description {
16241627
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
16251628
}
16261629

1627-
@media screen and ( max-width: 640px ) {
1630+
@media screen and (max-width: 640px) {
16281631
.customize-section-description-container + #customize-control-custom_css:last-child {
16291632
margin-right: 0;
16301633
}
@@ -1772,12 +1775,12 @@ p.customize-section-description {
17721775
}
17731776

17741777
.themes-filter-bar .feature-filter-toggle:before {
1775-
content: "\f111";
1776-
margin: 0 5px 0 0;
1777-
font: normal 16px/1 dashicons;
1778-
vertical-align: text-bottom;
1779-
-webkit-font-smoothing: antialiased;
1780-
-moz-osx-font-smoothing: grayscale;
1778+
content: "\f111";
1779+
margin: 0 5px 0 0;
1780+
font: normal 16px/1 dashicons;
1781+
vertical-align: text-bottom;
1782+
-webkit-font-smoothing: antialiased;
1783+
-moz-osx-font-smoothing: grayscale;
17811784
}
17821785

17831786
.themes-filter-bar .feature-filter-toggle.open {
@@ -2078,7 +2081,7 @@ p.customize-section-description {
20782081

20792082
/* Unstick the filter bar on short windows/screens. This breakpoint is based on the
20802083
current length of .org feature filters assuming translations do not wrap lines. */
2081-
@media screen and (max-height:540px), screen and (max-width:1018px) {
2084+
@media screen and (max-height: 540px), screen and (max-width: 1018px) {
20822085
.customize-preview-header.themes-filter-bar {
20832086
position: relative;
20842087
left: 0;
@@ -2101,13 +2104,13 @@ p.customize-section-description {
21012104
}
21022105
}
21032106

2104-
@media screen and (max-width:1018px) {
2107+
@media screen and (max-width: 1018px) {
21052108
.filter-drawer .filter-group {
21062109
width: calc( (100% - 50px) / 2);
21072110
}
21082111
}
21092112

2110-
@media screen and (max-width:900px) {
2113+
@media screen and (max-width: 900px) {
21112114
.customize-preview-header.themes-filter-bar {
21122115
height: 86px;
21132116
padding-top: 46px;
@@ -2128,7 +2131,7 @@ p.customize-section-description {
21282131
}
21292132
}
21302133

2131-
@media screen and (max-width:792px) {
2134+
@media screen and (max-width: 792px) {
21322135
.filter-drawer .filter-group {
21332136
width: calc( 100% - 25px);
21342137
}
@@ -2139,7 +2142,7 @@ p.customize-section-description {
21392142
}
21402143

21412144
/* Mobile - toggle between themes and filters */
2142-
@media screen and (max-width:600px) {
2145+
@media screen and (max-width: 600px) {
21432146

21442147
.filter-drawer {
21452148
top: 132px;
@@ -2320,7 +2323,7 @@ p.customize-section-description {
23202323
}
23212324

23222325
/* Small Screens */
2323-
@media (max-width:850px), (max-height:472px) {
2326+
@media (max-width: 850px), (max-height: 472px) {
23242327
.wp-customizer .theme-overlay .theme-wrap {
23252328
left: 0;
23262329
right: 0;
@@ -2692,9 +2695,10 @@ body.adding-widget .add-new-widget:before,
26922695
background: #fff;
26932696
border-bottom: 1px solid #ddd;
26942697
border-left: 4px solid #fff;
2695-
transition: .15s color ease-in-out,
2696-
.15s background-color ease-in-out,
2697-
.15s border-color ease-in-out;
2698+
transition:
2699+
.15s color ease-in-out,
2700+
.15s background-color ease-in-out,
2701+
.15s border-color ease-in-out;
26982702
cursor: pointer;
26992703
display: none;
27002704
}
@@ -2782,15 +2786,15 @@ body.adding-widget .add-new-widget:before,
27822786
}
27832787
}
27842788

2785-
@media screen and ( max-width: 1200px ) {
2789+
@media screen and (max-width: 1200px) {
27862790
.outer-section-open .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main,
27872791
.adding-menu-items .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main,
27882792
.adding-widget .wp-full-overlay.expanded.preview-mobile .wp-full-overlay-main {
27892793
left: 67%;
27902794
}
27912795
}
27922796

2793-
@media screen and ( max-width: 640px ) {
2797+
@media screen and (max-width: 640px) {
27942798

27952799
/* when the sidebar is collapsed and switching to responsive view,
27962800
bring it back see ticket #35220 */
@@ -2942,7 +2946,7 @@ body.adding-widget .add-new-widget:before,
29422946
}
29432947
}
29442948

2945-
@media screen and ( max-width: 600px ) {
2949+
@media screen and (max-width: 600px) {
29462950
.theme-browser .theme.active .theme-actions,
29472951
.wp-customizer .theme-browser .theme .theme-actions {
29482952
padding: 8px 15px;

src/wp-admin/css/customize-nav-menus.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,13 +874,13 @@ li.assigned-to-menu-location .add-new-menu-item {
874874
}
875875

876876

877-
@media screen and ( max-width: 782px ) {
877+
@media screen and (max-width: 782px) {
878878
#available-menu-items #available-menu-items-search .accordion-section-content {
879879
top: 63px;
880880
}
881881
}
882882

883-
@media screen and ( max-width: 640px ) {
883+
@media screen and (max-width: 640px) {
884884
#available-menu-items #available-menu-items-search .accordion-section-content {
885885
top: 130px;
886886
}

src/wp-admin/css/dashboard.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ a.rsswidget {
12531253

12541254
}
12551255

1256-
@media screen and ( max-width: 782px ) {
1256+
@media screen and (max-width: 782px) {
12571257
#dashboard_recent_comments #the-comment-list .comment-item .avatar {
12581258
height: 30px;
12591259
width: 30px;

src/wp-admin/css/deprecated-media.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,11 @@ span.required {
278278
border-bottom: 1px solid #ddd;
279279
}
280280

281-
h3.media-title {
281+
h3.media-title {
282282
font-size: 1.6em;
283283
}
284284

285-
h4.media-sub-title {
285+
h4.media-sub-title {
286286
border-bottom: 1px solid #ddd;
287287
font-size: 1.3em;
288288
margin: 12px;

0 commit comments

Comments
 (0)