From 265fabc1c43c22de7b4e40fd2548ce5c8f1e3451 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Fri, 17 Jun 2016 18:36:03 +0000 Subject: [PATCH] Use numeric font weights instead of keywords. When Open Sans was in use, the `300`, `400`, and `600` weights were loaded. `400` is the equivalent of `normal`; however, `bold` is equivalent to `700`, not `600`. With the move to system fonts, we need to be specific rather than relying on the lack of a `700` weight. Not all system fonts include a `600` weight; in those instances, they will use the `bold`/`700` weight. The WordPress CSS Coding Standards have been updated accordingly. props coderste. see #36753. git-svn-id: https://develop.svn.wordpress.org/trunk@37740 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/about.css | 12 ++++++------ src/wp-admin/css/common.css | 20 ++++++++++---------- src/wp-admin/css/customize-controls.css | 4 ++-- src/wp-admin/css/customize-nav-menus.css | 2 +- src/wp-admin/css/dashboard.css | 12 ++++++------ src/wp-admin/css/deprecated-media.css | 12 ++++++------ src/wp-admin/css/edit.css | 6 +++--- src/wp-admin/css/forms.css | 4 ++-- src/wp-admin/css/ie.css | 2 +- src/wp-admin/css/install.css | 8 ++++---- src/wp-admin/css/l10n.css | 4 ++-- src/wp-admin/css/list-tables.css | 2 +- src/wp-admin/css/login.css | 6 +++--- src/wp-admin/css/media.css | 2 +- src/wp-admin/css/nav-menus.css | 4 ++-- src/wp-admin/css/press-this.css | 6 +++--- src/wp-admin/css/revisions.css | 2 +- src/wp-admin/css/themes.css | 4 ++-- src/wp-admin/css/widgets.css | 2 +- src/wp-includes/css/admin-bar.css | 12 ++++++------ src/wp-includes/css/editor.css | 12 ++++++------ src/wp-includes/css/media-views.css | 18 +++++++++--------- src/wp-includes/css/wp-embed-template.css | 4 ++-- 23 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index aad606fbed..500fd39e43 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -136,13 +136,13 @@ .about-wrap code, .about-wrap ol li p { font-size: 14px; - font-weight: normal; + font-weight: 400; } .about-wrap .about-description, .about-wrap .about-text { margin-top: 1.4em; - font-weight: normal; + font-weight: 400; line-height: 1.6em; font-size: 19px; } @@ -325,7 +325,7 @@ .about-wrap .return-to-dashboard { margin: 30px 0 0 -5px; font-size: 14px; - font-weight: bold; + font-weight: 600; } .about-wrap .return-to-dashboard a { @@ -387,7 +387,7 @@ .about-wrap .wp-person .web { margin: 6px 0 2px; font-size: 16px; - font-weight: normal; + font-weight: 400; line-height: 2em; text-decoration: none; } @@ -412,11 +412,11 @@ .freedoms-php .about-wrap ol li { list-style-type: decimal; - font-weight: bold; + font-weight: 600; } .freedoms-php .about-wrap ol p { - font-weight: normal; + font-weight: 400; margin: 0.6em 0; } diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index 66b5ef685f..1509e5a0d8 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -437,7 +437,7 @@ code { .subsubsub a .count, .subsubsub a.current .count { color: #555d66; /* #f1f1f1 background */ - font-weight: normal; + font-weight: 400; } .subsubsub a.current { @@ -581,7 +581,7 @@ code { padding-left: 25px; color: #555d66; font-size: 14px; - font-weight: normal; + font-weight: 400; } .wrap .add-new-h2, /* deprecated */ @@ -1056,7 +1056,7 @@ th.action-links { line-height: 1; text-align: center; text-decoration: inherit; - font-weight: normal; + font-weight: 400; font-style: normal; -webkit-font-smoothing: antialiased; } @@ -1861,7 +1861,7 @@ html.wp-toolbar { .widefat th, .widefat thead td, .widefat tfoot td { - font-weight: normal; + font-weight: 400; } .widefat thead tr th, @@ -1968,7 +1968,7 @@ html.wp-toolbar { .hndle a { font-size: 11px; - font-weight: normal; + font-weight: 400; } .postbox .handlediv { @@ -2379,7 +2379,7 @@ div.star-holder .star-rating { line-height: 1; font-family: dashicons; text-decoration: inherit; - font-weight: normal; + font-weight: 400; font-style: normal; vertical-align: top; -webkit-transition: color .1s ease-in 0; @@ -2407,7 +2407,7 @@ div.star-holder .star-rating { } div.action-links { - font-weight: normal; + font-weight: 400; margin: 6px 0 0; } @@ -2455,7 +2455,7 @@ div.action-links { #plugin-information-title h2 { font-size: 1em; - font-weight: bold; + font-weight: 600; padding: 0; margin: 0; max-width: 680px; @@ -2594,7 +2594,7 @@ div.action-links { } #plugin-information .fyi h3 { - font-weight: bold; + font-weight: 600; text-transform: uppercase; font-size: 12px; color: #666; @@ -3104,7 +3104,7 @@ img { #templateside .highlight { border: none; - font-weight: bold; + font-weight: 600; } .nonessential { diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index ed4038df8c..24d6483c8d 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -576,7 +576,7 @@ p.customize-section-description { } .customize-control .attachment-title { - font-weight: bold; + font-weight: 600; margin: 0; padding: 5px 10px; } @@ -1010,7 +1010,7 @@ p.customize-section-description { right: 10px; top: 50%; margin-top: -14px; - font-weight: normal; + font-weight: 400; } .control-section-themes .accordion-section-title:before { diff --git a/src/wp-admin/css/customize-nav-menus.css b/src/wp-admin/css/customize-nav-menus.css index d51f908e59..6256f17352 100644 --- a/src/wp-admin/css/customize-nav-menus.css +++ b/src/wp-admin/css/customize-nav-menus.css @@ -511,7 +511,7 @@ #available-menu-items .cannot-expand .accordion-section-title .no-items { float: right; color: #555d66; - font-weight: normal; + font-weight: 400; margin-left: 5px; } diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 4e6d9303ed..72b02303a8 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -114,7 +114,7 @@ .welcome-panel h2 { margin: 0; font-size: 21px; - font-weight: normal; + font-weight: 400; line-height: 1.2; } @@ -342,7 +342,7 @@ body #dashboard-widgets .postbox form .submit { } #dashboard_primary .rss-widget a { - font-weight: normal; + font-weight: 400; } #dashboard_primary .rss-widget span, @@ -400,7 +400,7 @@ body #dashboard-widgets .postbox form .submit { margin: 0 0 10px; padding: 0; font-size: 14px; - font-weight: normal; + font-weight: 400; } /* Dashboard right now - Colors */ @@ -534,7 +534,7 @@ form.initial-form.quickpress-open input#title { } #dashboard_primary a.rsswidget { - font-weight: normal; + font-weight: 400; } #dashboard_quick_press .drafts ul { @@ -570,7 +570,7 @@ form.initial-form.quickpress-open input#title { margin: 0 12px 8px; padding: 0; font-size: 14px; - font-weight: normal; + font-weight: 400; color: #23282d; } @@ -829,7 +829,7 @@ form.initial-form.quickpress-open input#title { #latest-comments #the-comment-list .comment-meta cite { font-style: normal; - font-weight: normal; + font-weight: 400; } #latest-comments #the-comment-list .comment-item blockquote, diff --git a/src/wp-admin/css/deprecated-media.css b/src/wp-admin/css/deprecated-media.css index db2a017a4e..9249309cd2 100644 --- a/src/wp-admin/css/deprecated-media.css +++ b/src/wp-admin/css/deprecated-media.css @@ -3,7 +3,7 @@ div#media-upload-header { margin: 0; padding: 5px 5px 0; - font-weight: bold; + font-weight: 600; position: relative; border-bottom: 1px solid #ddd; background: #f9f9f9; @@ -19,7 +19,7 @@ div#media-upload-header { padding-left: 10px; list-style: none; font-size: 12px; - font-weight: normal; + font-weight: 400; } #sidemenu a { @@ -46,7 +46,7 @@ div#media-upload-header { } #sidemenu a.current { - font-weight: normal; + font-weight: 400; padding-left: 6px; padding-right: 6px; border: 1px solid #ddd; @@ -89,7 +89,7 @@ th { .media-upload-form label.form-help, td.help { font-family: sans-serif; font-style: italic; - font-weight: normal; + font-weight: 400; } .media-upload-form p.help { @@ -187,7 +187,7 @@ span.required { #media-upload label.help { font-family: sans-serif; font-style: italic; - font-weight: normal; + font-weight: 400; } #media-upload .ui-sortable .media-item { @@ -294,7 +294,7 @@ h4.media-sub-title { h3.media-title, h4.media-sub-title { font-family: Georgia,"Times New Roman",Times,serif; - font-weight: normal; + font-weight: 400; color: #5A5A5A; } diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index e4aa70f93b..bbdb79de6c 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -114,12 +114,12 @@ input#link_url { } #editable-post-name { - font-weight: bold; + font-weight: 600; } #editable-post-name input { font-size: 13px; - font-weight: normal; + font-weight: 400; height: 22px; margin: 0; width: 16em; @@ -1170,7 +1170,7 @@ table.links-table { } .links-table th { - font-weight: normal; + font-weight: 400; text-align: left; vertical-align: top; min-width: 80px; diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index a42a948c34..f2198314e1 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -632,7 +632,7 @@ ul#add-to-blog-users { .form-table th, .form-wrap label { color: #23282d; - font-weight: normal; + font-weight: 400; text-shadow: none; vertical-align: baseline; } @@ -759,7 +759,7 @@ table.form-table td .updated p { .tool-box .title { margin: 8px 0; font-size: 18px; - font-weight: normal; + font-weight: 400; line-height: 24px; } diff --git a/src/wp-admin/css/ie.css b/src/wp-admin/css/ie.css index fe9bc436ab..90cf8f341c 100644 --- a/src/wp-admin/css/ie.css +++ b/src/wp-admin/css/ie.css @@ -638,7 +638,7 @@ input[type="password"], .mce-close { font-family: 'tinymce', Arial; font-style: normal; - font-weight: normal; + font-weight: 400; font-variant: normal; font-size: 16px; margin-left: 0; diff --git a/src/wp-admin/css/install.css b/src/wp-admin/css/install.css index 34848e66cd..e055f305d8 100644 --- a/src/wp-admin/css/install.css +++ b/src/wp-admin/css/install.css @@ -45,7 +45,7 @@ h1, h2 { font-size: 24px; padding: 0; padding-bottom: 7px; - font-weight: normal; + font-weight: 400; } h3 { @@ -100,7 +100,7 @@ label { color: #444; /* same as login.css */ height: 84px; font-size: 20px; - font-weight: normal; + font-weight: 400; line-height: 1.3em; margin: -130px auto 25px; padding: 0; @@ -192,7 +192,7 @@ submit { } .form-table th p { - font-weight: normal; + font-weight: 400; } .form-table.install-success th, @@ -406,7 +406,7 @@ body.language-chooser { color: #32373c; font-size: 16px; font-family: Arial, sans-serif; - font-weight: normal; + font-weight: 400; } .language-chooser p { diff --git a/src/wp-admin/css/l10n.css b/src/wp-admin/css/l10n.css index 6c603bffbf..967fb4c6c6 100644 --- a/src/wp-admin/css/l10n.css +++ b/src/wp-admin/css/l10n.css @@ -16,7 +16,7 @@ body.rtl .press-this a.wp-switch-editor { .rtl h5, .rtl h6 { font-family: Arial, sans-serif; - font-weight: bold; + font-weight: 600; } /* he_IL: Remove Tahoma from the font stack. Arial is best for Hebrew. */ @@ -28,7 +28,7 @@ body.locale-he-il .press-this a.wp-switch-editor { /* he_IL: Have be bold rather than italic. */ .locale-he-il em { font-style: normal; - font-weight: bold; + font-weight: 600; } /* zh_CN: Remove italic properties. */ diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index 88517875b9..15cfe2d8a6 100644 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -700,7 +700,7 @@ th.asc a:focus span.sorting-indicator { background: #e5e5e5; font-size: 16px; line-height: 1; - font-weight: normal; + font-weight: 400; text-align: center; } diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css index d53eabf44e..7c7d6042ea 100644 --- a/src/wp-admin/css/login.css +++ b/src/wp-admin/css/login.css @@ -83,7 +83,7 @@ p { margin-top: 20px; margin-left: 0; padding: 26px 24px 46px; - font-weight: normal; + font-weight: 400; overflow: hidden; background: #fff; -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); @@ -91,7 +91,7 @@ p { } .login form .forgetmenot { - font-weight: normal; + font-weight: 400; float: left; margin-bottom: 0; } @@ -133,7 +133,7 @@ p { color: #444; height: 84px; font-size: 20px; - font-weight: normal; + font-weight: 400; line-height: 1.3em; margin: 0 auto 25px; padding: 0; diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index de85e427e2..22cc406f23 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -813,7 +813,7 @@ border color while dragging a file over the uploader drop area */ } .edit-attachment-frame .attachment-info .filename { - font-weight: normal; + font-weight: 400; color: #666; } diff --git a/src/wp-admin/css/nav-menus.css b/src/wp-admin/css/nav-menus.css index a230d9d541..eb61262b82 100644 --- a/src/wp-admin/css/nav-menus.css +++ b/src/wp-admin/css/nav-menus.css @@ -71,7 +71,7 @@ ul.add-menu-item-tabs li { .is-submenu { color: #555d66; /* #fafafa background */ font-style: italic; - font-weight: normal; + font-weight: 400; margin-left: 4px; } @@ -215,7 +215,7 @@ ul.add-menu-item-tabs li { } .menu-location-title label { - font-weight: bold; + font-weight: 600; } .menu-location-menus select { diff --git a/src/wp-admin/css/press-this.css b/src/wp-admin/css/press-this.css index ca52b975b1..6f4f621b83 100644 --- a/src/wp-admin/css/press-this.css +++ b/src/wp-admin/css/press-this.css @@ -81,7 +81,7 @@ abbr[title] { b, strong { - font-weight: bold; + font-weight: 700; } dfn { @@ -232,7 +232,7 @@ textarea { } optgroup { - font-weight: bold; + font-weight: 700; } table { @@ -2072,7 +2072,7 @@ html { display: inline-block; margin: 0 0 0 8px; font-size: 14px; - font-weight: normal; + font-weight: 400; } .setting-modal { diff --git a/src/wp-admin/css/revisions.css b/src/wp-admin/css/revisions.css index 8a867dcf2d..6ae57ef8d4 100644 --- a/src/wp-admin/css/revisions.css +++ b/src/wp-admin/css/revisions.css @@ -149,7 +149,7 @@ body.folded .revisions .loading-indicator { } .revisions-controls .author-card .author-name { - font-weight: bold; + font-weight: 600; } .comparing-two-revisions .diff-meta-to strong { diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index 9f04e6354a..a6e5dafd76 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -723,7 +723,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { .theme-overlay .theme-tags span { color: #444; - font-weight: bold; + font-weight: 600; margin-right: 5px; } @@ -732,7 +732,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { border: 1px solid #eee; border-left: 4px solid #00a0d2; font-size: 14px; - font-weight: normal; + font-weight: 400; margin-top: 30px; padding: 10px 10px 10px 20px; } diff --git a/src/wp-admin/css/widgets.css b/src/wp-admin/css/widgets.css index 9b7ab2d519..f0be076c0e 100644 --- a/src/wp-admin/css/widgets.css +++ b/src/wp-admin/css/widgets.css @@ -369,7 +369,7 @@ div#widgets-right .closed .widgets-sortables { /* Dragging widgets over the available widget area show's a "Deactivate" message */ #removing-widget { display: none; - font-weight: normal; + font-weight: 400; padding-left: 15px; font-size: 12px; line-height: 1; diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index b70077c476..3b83efe2d1 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -8,7 +8,7 @@ text-transform: none; letter-spacing: normal; font-size: 13px; - font-weight: normal; + font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif; line-height: 32px; -webkit-border-radius: 0; @@ -83,7 +83,7 @@ html:lang(he-il) .rtl #wpadminbar * { direction: ltr; color: #ccc; font-size: 13px; - font-weight: normal; + font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif; line-height: 32px; height: 32px; @@ -182,7 +182,7 @@ html:lang(he-il) .rtl #wpadminbar * { } #wpadminbar .quicklinks .menupop ul li a strong { - font-weight: bold; + font-weight: 600; } #wpadminbar .quicklinks .menupop ul li .ab-item, @@ -366,7 +366,7 @@ html:lang(he-il) .rtl #wpadminbar * { display: inline; padding: 2px 5px; font-size: 10px; - font-weight: bold; + font-weight: 600; -webkit-border-radius: 10px; border-radius: 10px; } @@ -720,7 +720,7 @@ html:lang(he-il) .rtl #wpadminbar * { width: auto; display: block; font-size: 14px; - font-weight: bold; + font-weight: 600; padding: 15px 23px 14px; background: #f1f1f1; color: #0073aa; @@ -807,7 +807,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar * { font-size: 14px; - font-weight: normal; + font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif; line-height: 32px; } diff --git a/src/wp-includes/css/editor.css b/src/wp-includes/css/editor.css index 899cb3de84..27dd2f2cfc 100644 --- a/src/wp-includes/css/editor.css +++ b/src/wp-includes/css/editor.css @@ -140,7 +140,7 @@ div.mce-tab:focus { margin: 8px 0; white-space: normal; font-size: 14px; - font-weight: normal; + font-weight: 400; } .mce-window .wp-editor-help table { @@ -180,14 +180,14 @@ div.mce-tab:focus { } .mce-window .wp-editor-help th { - font-weight: bold; + font-weight: 600; padding-bottom: 0; } .mce-window .wp-editor-help kbd { font-family: monospace; padding: 2px 7px 3px; - font-weight: bold; + font-weight: 600; margin: 0; background: #eaeaea; background: rgba(0,0,0,0.08); @@ -838,7 +838,7 @@ div.mce-menu .mce-menu-item-sep, .mce-notification button.mce-close { right: 6px; top: 3px; - font-weight: normal; + font-weight: 400; color: #555d66; } @@ -1242,7 +1242,7 @@ i.mce-i-wp_code:before { } .quicktags-toolbar input[value="b"] { - font-weight: bold; + font-weight: 600; } .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw, @@ -1601,7 +1601,7 @@ i.mce-i-wp_code:before { } #wp-link li.selected .item-title { - font-weight: bold; + font-weight: 600; } #wp-link li:last-child { diff --git a/src/wp-includes/css/media-views.css b/src/wp-includes/css/media-views.css index 313bf90904..ca20b51a01 100644 --- a/src/wp-includes/css/media-views.css +++ b/src/wp-includes/css/media-views.css @@ -341,7 +341,7 @@ .media-sidebar h2, .image-details h2 { position: relative; - font-weight: bold; + font-weight: 600; text-transform: uppercase; font-size: 12px; color: #666; @@ -404,7 +404,7 @@ min-height: 22px; padding-top: 8px; line-height: 16px; - font-weight: normal; + font-weight: 400; color: #666; } @@ -566,7 +566,7 @@ .media-menu .active, .media-menu .active:hover { color: #23282d; - font-weight: bold; + font-weight: 600; } .media-menu .separator { @@ -973,7 +973,7 @@ max-height: 100%; word-wrap: break-word; text-align: center; - font-weight: bold; + font-weight: 600; background: rgba( 255, 255, 255, 0.8 ); -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); @@ -1274,7 +1274,7 @@ } .upload-errors .upload-error-filename { - font-weight: bold; + font-weight: 600; } .upload-errors .upload-error-message { @@ -1374,7 +1374,7 @@ .uploader-inline .has-upload-message .upload-instructions { font-size: 14px; color: #444; - font-weight: normal; + font-weight: 400; } .uploader-inline .drop-instructions { @@ -1438,7 +1438,7 @@ padding-top: 12px; font-size: 14px; line-height: 20px; - font-weight: bold; + font-weight: 600; } .media-selection .button-link { @@ -1616,7 +1616,7 @@ } .attachment-info .filename { - font-weight: bold; + font-weight: 600; color: #444; word-wrap: break-word; } @@ -2173,7 +2173,7 @@ transform: translateY( -50% ); font-size: 3em; line-height: 1.3; - font-weight: bold; + font-weight: 600; color: #fff; padding: 0; margin: 0; diff --git a/src/wp-includes/css/wp-embed-template.css b/src/wp-includes/css/wp-embed-template.css index 3397396ee1..35fe4d24d6 100644 --- a/src/wp-includes/css/wp-embed-template.css +++ b/src/wp-includes/css/wp-embed-template.css @@ -104,7 +104,7 @@ body { p.wp-embed-heading { margin: 0 0 15px; - font-weight: bold; + font-weight: 600; font-size: 22px; line-height: 1.3; } @@ -136,7 +136,7 @@ p.wp-embed-heading { } .wp-embed-site-title { - font-weight: bold; + font-weight: 600; line-height: 25px; }