diff --git a/.csslintrc b/.csslintrc deleted file mode 100644 index 177e4fc..0000000 --- a/.csslintrc +++ /dev/null @@ -1,40 +0,0 @@ ---errors=box-model, - display-property-grouping, - duplicate-background-images, - duplicate-properties, - empty-rules, - ids, - import, - important, - known-properties, - outline-none, - overqualified-elements, - qualified-headings, - shorthand, - star-property-hack, - text-indent, - underscore-property-hack, - unique-headings, - unqualified-attributes, - vendor-prefix, - zero-units ---ignore=adjoining-classes, - box-sizing, - bulletproof-font-face, - compatible-vendor-prefixes, - errors, - fallback-colors, - floats, - font-faces, - font-sizes, - gradients, - import-ie-limit, - order-alphabetical, - regex-selectors, - rules-count, - selector-max, - selector-max-approaching, - selector-newline, - universal-selector ---exclude-list=core/assets, - vendor diff --git a/.htaccess b/.htaccess index 83cb71a..2d04d29 100644 --- a/.htaccess +++ b/.htaccess @@ -120,7 +120,7 @@ AddEncoding gzip svgz # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: - # RewriteBase / + RewriteBase / # Redirect common PHP files to their new locations. RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR] diff --git a/core/.stylelintrc.json b/core/.stylelintrc.json new file mode 100644 index 0000000..877180f --- /dev/null +++ b/core/.stylelintrc.json @@ -0,0 +1,44 @@ +{ + "extends": "stylelint-config-standard", + "plugins": [ + "stylelint-no-browser-hacks/lib" + ], + "rules": { + "at-rule-empty-line-before": null, + "block-no-empty": null, + "color-hex-case": null, + "color-hex-length": null, + "comment-empty-line-before": null, + "declaration-block-no-duplicate-properties": null, + "declaration-block-no-redundant-longhand-properties": null, + "declaration-block-no-shorthand-property-overrides": null, + "declaration-block-trailing-semicolon": null, + "declaration-colon-space-after": null, + "function-comma-space-after": null, + "function-linear-gradient-no-nonstandard-direction": null, + "function-name-case": null, + "function-whitespace-after": null, + "indentation": 2, + "length-zero-no-unit": null, + "no-empty-source": null, + "no-unknown-animations": true, + "number-leading-zero": null, + "number-no-trailing-zeros": null, + "plugin/no-browser-hacks": [true, { + "browsers": [ + "last 2 versions", + "ie >=8" + ] + }], + "property-no-unknown": null, + "rule-empty-line-before": null, + "selector-pseudo-element-colon-notation": null, + "selector-type-no-unknown": null, + "shorthand-property-no-redundant-values": null, + "unit-whitelist": ["deg", "em", "ex", "ms", "rem", "%", "s", "px"] + }, + "ignoreFiles": [ + "assets/vendor/**/*.css", + "tests/Drupal/Tests/Core/Asset/css_test_files/**/*.css" + ] +} diff --git a/core/modules/ckeditor/css/ckeditor-iframe.css b/core/modules/ckeditor/css/ckeditor-iframe.css index 8996334..c34a683 100644 --- a/core/modules/ckeditor/css/ckeditor-iframe.css +++ b/core/modules/ckeditor/css/ckeditor-iframe.css @@ -16,7 +16,9 @@ body { } } -ol, ul, dl { +ol, +ul, +dl { /* Preserved spaces for list items with text direction other than the list. * (CKEditor issues #6249,#8049) */ padding: 0 40px; diff --git a/core/modules/ckeditor/css/ckeditor.admin.css b/core/modules/ckeditor/css/ckeditor.admin.css index 8b771c7..cfbeae0 100644 --- a/core/modules/ckeditor/css/ckeditor.admin.css +++ b/core/modules/ckeditor/css/ckeditor.admin.css @@ -6,8 +6,6 @@ * "moono". */ - - .ckeditor-toolbar { border: 1px solid #b6b6b6; padding: 0.1667em 0.1667em 0.08em; diff --git a/core/modules/outside_in/css/outside_in.motion.css b/core/modules/outside_in/css/outside_in.motion.css index 450bffe..8bc57d3 100644 --- a/core/modules/outside_in/css/outside_in.motion.css +++ b/core/modules/outside_in/css/outside_in.motion.css @@ -10,7 +10,6 @@ * file: https://www.drupal.org/node/2784443. */ - /* Transition the edit icon in the toolbar. */ #toolbar-bar.button.toolbar-icon.toolbar-icon.toolbar-icon-edit:before { -webkit-transition: all .7s ease; @@ -34,11 +33,3 @@ -moz-transition: all .5s ease; transition: all .5s ease; } - -/* Transition the administration tray. -#toolbar-administration, -#toolbar-administration * { - -webkit-transition: all .7s ease; - -moz-transition: all .7s ease; - transition: all .7s ease; -}*/ diff --git a/core/modules/outside_in/css/outside_in.tabledrag.css b/core/modules/outside_in/css/outside_in.tabledrag.css index e9d825f..28ebead 100644 --- a/core/modules/outside_in/css/outside_in.tabledrag.css +++ b/core/modules/outside_in/css/outside_in.tabledrag.css @@ -5,7 +5,6 @@ * @see tabledrag.js */ - /* Because base font sizes will vary widely across themes, to maintain consistency outside-in uses only pixels. */ .ui-dialog-outside-in body.drag { diff --git a/core/modules/outside_in/css/outside_in.theme.css b/core/modules/outside_in/css/outside_in.theme.css index 91c01ab..510ff83 100644 --- a/core/modules/outside_in/css/outside_in.theme.css +++ b/core/modules/outside_in/css/outside_in.theme.css @@ -235,7 +235,6 @@ background: #2b8bd8; } - /* * Visual styling for dropbutton in the Settings Tray module's off canvas tray. * @todo Move to its own component: diff --git a/core/modules/system/tests/modules/layout_test/css/layout-test-2col.css b/core/modules/system/tests/modules/layout_test/css/layout-test-2col.css index d5c05b9..ca7e876 100644 --- a/core/modules/system/tests/modules/layout_test/css/layout-test-2col.css +++ b/core/modules/system/tests/modules/layout_test/css/layout-test-2col.css @@ -1,4 +1,4 @@ - +/* stylelint-disable plugin/no-browser-hacks */ .layout-example-2col .region-left { float: left; width: 50%; @@ -14,3 +14,4 @@ * html .layout-example-2col .region-right { width: 49.9%; } +/* stylelint-disable */ diff --git a/core/modules/toolbar/css/toolbar.icons.theme.css b/core/modules/toolbar/css/toolbar.icons.theme.css index c52f868..54248a2 100644 --- a/core/modules/toolbar/css/toolbar.icons.theme.css +++ b/core/modules/toolbar/css/toolbar.icons.theme.css @@ -219,7 +219,6 @@ background-color: #f5f5f5; } - /** * Handle. */ @@ -280,8 +279,7 @@ background-image: url(../../../misc/icons/bebebe/push-left.svg); /* LTR */ } .toolbar .toolbar-toggle-orientation [value="vertical"]:hover:before, -.toolbar .toolbar-toggle-orientation [value="vertical"]:focus:before - { +.toolbar .toolbar-toggle-orientation [value="vertical"]:focus:before { background-image: url(../../../misc/icons/787878/push-left.svg); /* LTR */ } [dir="rtl"] .toolbar .toolbar-toggle-orientation [value="vertical"]:before { diff --git a/core/modules/toolbar/css/toolbar.theme.css b/core/modules/toolbar/css/toolbar.theme.css index 981ee00..0b3afc9 100644 --- a/core/modules/toolbar/css/toolbar.theme.css +++ b/core/modules/toolbar/css/toolbar.theme.css @@ -20,7 +20,8 @@ line-height: 1em; text-decoration: none; } -.toolbar .toolbar-item:hover, .toolbar .toolbar-item:focus { +.toolbar .toolbar-item:hover, +.toolbar .toolbar-item:focus { text-decoration: underline; } @@ -93,8 +94,7 @@ .toolbar-tray a:hover, .toolbar-tray a:active, .toolbar-tray a:focus, -.toolbar-tray a.is-active - { +.toolbar-tray a.is-active { color: #000; text-decoration: underline; } diff --git a/core/package.json b/core/package.json index b168cb3..965f394 100644 --- a/core/package.json +++ b/core/package.json @@ -6,14 +6,18 @@ "scripts": { "build:js": "node ./scripts/js/babel-es6-build.js", "watch:js": "node ./scripts/js/babel-es6-watch.js", - "lint:js": "eslint . || exit 0" + "lint:js": "eslint . || exit 0", + "lint:css": "stylelint '**/*.css' || exit 0" }, "devDependencies": { "babel-core": "6.17.0", "babel-preset-es2015": "6.16.0", "chokidar": "1.6.0", "eslint": "3.8.1", - "glob": "^7.1.1" + "glob": "^7.1.1", + "stylelint": "^7.10.1", + "stylelint-config-standard": "^16.0.0", + "stylelint-no-browser-hacks": "^1.0.2" }, "babel": { "presets": [ diff --git a/core/themes/bartik/css/base/elements.css b/core/themes/bartik/css/base/elements.css index ac47566..645cefa 100644 --- a/core/themes/bartik/css/base/elements.css +++ b/core/themes/bartik/css/base/elements.css @@ -132,7 +132,8 @@ img { max-width: 100%; height: auto; } -ul, ol { +ul, +ol { margin: 0; padding: 0 0 0.25em 1em; /* LTR */ } diff --git a/core/themes/bartik/css/components/comments.css b/core/themes/bartik/css/components/comments.css index a80e049..5acf4d5 100644 --- a/core/themes/bartik/css/components/comments.css +++ b/core/themes/bartik/css/components/comments.css @@ -49,7 +49,6 @@ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.733em; line-height: 1.2; - } .comment__permalink { font-size: 0.733em; diff --git a/core/themes/bartik/css/components/form.css b/core/themes/bartik/css/components/form.css index 3e46920..5ff46e4 100644 --- a/core/themes/bartik/css/components/form.css +++ b/core/themes/bartik/css/components/form.css @@ -316,7 +316,9 @@ input.form-submit:focus { -moz-box-sizing: border-box; } - .js .dropbutton .dropbutton-action > input, .js .dropbutton .dropbutton-action > a, .js .dropbutton .dropbutton-action > button { + .js .dropbutton .dropbutton-action > input, + .js .dropbutton .dropbutton-action > a, + .js .dropbutton .dropbutton-action > button { text-align: center; padding-left: 3em; } diff --git a/core/themes/bartik/css/components/header.css b/core/themes/bartik/css/components/header.css index 40ea0f0..7c7b8e5 100644 --- a/core/themes/bartik/css/components/header.css +++ b/core/themes/bartik/css/components/header.css @@ -21,7 +21,6 @@ } .region-header .site-branding { float: left; /* LTR */ - /* margin-bottom: 1.857em;*/ } [dir="rtl"] .region-header .site-branding { float: right; diff --git a/core/themes/classy/css/components/progress.css b/core/themes/classy/css/components/progress.css index 1fb80a6..60bc123 100644 --- a/core/themes/classy/css/components/progress.css +++ b/core/themes/classy/css/components/progress.css @@ -18,26 +18,13 @@ background: #057ec9; background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)), - -webkit-linear-gradient( left top, - #0094f0 0%, - #0094f0 25%, - #007ecc 25%, - #007ecc 50%, - #0094f0 50%, - #0094f0 75%, - #0094f0 100% ); + -webkit-linear-gradient(left top, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%); background-image: - -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)), -webkit-linear-gradient(left top, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%); + -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)), + -webkit-linear-gradient(left top, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%); background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)), - linear-gradient( to right bottom, - #0094f0 0%, - #0094f0 25%, - #007ecc 25%, - #007ecc 50%, - #0094f0 50%, - #0094f0 75%, - #0094f0 100% ); + linear-gradient(to right bottom, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%); background-size: 40px 40px; margin-top: -1px; margin-left: -1px; /* LTR */ @@ -61,11 +48,14 @@ * Progress bar animations. */ @-webkit-keyframes animate-stripes { - 0% {background-position: 0 0, 0 0;} 100% {background-position: 0 0, -80px 0;} + 0% { background-position: 0 0, 0 0; } + 100% { background-position: 0 0, -80px 0; } } @-ms-keyframes animate-stripes { - 0% {background-position: 0 0, 0 0;} 100% {background-position: 0 0, -80px 0;} + 0% { background-position: 0 0, 0 0; } + 100% { background-position: 0 0, -80px 0; } } @keyframes animate-stripes { - 0% {background-position: 0 0, 0 0;} 100% {background-position: 0 0, -80px 0;} + 0% { background-position: 0 0, 0 0; } + 100% { background-position: 0 0, -80px 0; } } diff --git a/core/themes/seven/css/base/print.css b/core/themes/seven/css/base/print.css index 653e511..c432ccb 100644 --- a/core/themes/seven/css/base/print.css +++ b/core/themes/seven/css/base/print.css @@ -42,7 +42,8 @@ color: #000; text-decoration: underline; } - .button, .button--primary { + .button, + .button--primary { background: none !important; } .messages { @@ -70,7 +71,17 @@ background: none; border-radius: 4px; } - input.form-autocomplete, input.form-text, input.form-tel, input.form-email, input.form-url, input.form-search, input.form-number, input.form-color, input.form-file, textarea.form-textarea, select.form-select { + input.form-autocomplete, + input.form-text, + input.form-tel, + input.form-email, + input.form-url, + input.form-search, + input.form-number, + input.form-color, + input.form-file, + textarea.form-textarea, + select.form-select { border-width: 1px; } } diff --git a/core/themes/seven/css/components/dialog.css b/core/themes/seven/css/components/dialog.css index 99aaa53..7b2ea3b 100644 --- a/core/themes/seven/css/components/dialog.css +++ b/core/themes/seven/css/components/dialog.css @@ -60,7 +60,6 @@ } .ui-dialog .ui-widget-content.ui-dialog-buttonpane { background: #f5f5f2; - /*border-top: 1px solid #bfbfbf;*/ margin: 0; padding: 15px 20px; border-bottom-left-radius: 5px; diff --git a/core/themes/seven/css/components/form.css b/core/themes/seven/css/components/form.css index f3acc2c..0db30e8 100644 --- a/core/themes/seven/css/components/form.css +++ b/core/themes/seven/css/components/form.css @@ -127,7 +127,6 @@ label[for] { padding: 0.25em 0.666em 0; } - /* Filter */ ul.tips, div.description, @@ -254,7 +253,8 @@ select { } select:focus, select:hover { - background-image: url(../../../../misc/icons/333333/caret-down.svg), + background-image: + url(../../../../misc/icons/333333/caret-down.svg), -webkit-linear-gradient(top, #fcfcfa, #e9e9dd); color: #1a1a1a; } diff --git a/core/themes/seven/css/components/messages.css b/core/themes/seven/css/components/messages.css index c23a4d1..8b521cc 100644 --- a/core/themes/seven/css/components/messages.css +++ b/core/themes/seven/css/components/messages.css @@ -10,12 +10,18 @@ .messages pre { margin: 0; } -.messages h1, .messages .heading-a, -.messages h2, .messages .heading-b, -.messages h3, .messages .heading-c, -.messages h4, .messages .heading-d, -.messages h5, .messages .heading-e, -.messages h6, .messages .heading-f { +.messages h1, +.messages .heading-a, +.messages h2, +.messages .heading-b, +.messages h3, +.messages .heading-c, +.messages h4, +.messages .heading-d, +.messages h5, +.messages .heading-e, +.messages h6, +.messages .heading-f { margin-top: 0; } diff --git a/core/themes/seven/css/components/views-ui.css b/core/themes/seven/css/components/views-ui.css index 6849781..d212dd0 100644 --- a/core/themes/seven/css/components/views-ui.css +++ b/core/themes/seven/css/components/views-ui.css @@ -74,7 +74,6 @@ details.fieldset-no-legend { margin-right: 1.5em; } - .views-admin-dependent .form-item .form-item, .views-admin-dependent .form-type-checkboxes, .views-admin-dependent .form-type-radios, diff --git a/core/themes/seven/css/theme/install-page.css b/core/themes/seven/css/theme/install-page.css index 350e1e6..ad43e4f 100644 --- a/core/themes/seven/css/theme/install-page.css +++ b/core/themes/seven/css/theme/install-page.css @@ -59,5 +59,4 @@ width: auto; max-width: 100%; } - } diff --git a/core/themes/seven/css/theme/maintenance-page.css b/core/themes/seven/css/theme/maintenance-page.css index f067a36..bea8321 100644 --- a/core/themes/seven/css/theme/maintenance-page.css +++ b/core/themes/seven/css/theme/maintenance-page.css @@ -135,7 +135,9 @@ padding: 1em 0; vertical-align: middle; } - html, .install-page, .maintenance-page { + html, + .install-page, + .maintenance-page { margin: 0; width: 100%; height: 100%; diff --git a/core/themes/stable/css/ckeditor/ckeditor-iframe.css b/core/themes/stable/css/ckeditor/ckeditor-iframe.css index 8996334..c34a683 100644 --- a/core/themes/stable/css/ckeditor/ckeditor-iframe.css +++ b/core/themes/stable/css/ckeditor/ckeditor-iframe.css @@ -16,7 +16,9 @@ body { } } -ol, ul, dl { +ol, +ul, +dl { /* Preserved spaces for list items with text direction other than the list. * (CKEditor issues #6249,#8049) */ padding: 0 40px; diff --git a/core/themes/stable/css/ckeditor/ckeditor.admin.css b/core/themes/stable/css/ckeditor/ckeditor.admin.css index 8b771c7..cfbeae0 100644 --- a/core/themes/stable/css/ckeditor/ckeditor.admin.css +++ b/core/themes/stable/css/ckeditor/ckeditor.admin.css @@ -6,8 +6,6 @@ * "moono". */ - - .ckeditor-toolbar { border: 1px solid #b6b6b6; padding: 0.1667em 0.1667em 0.08em; diff --git a/core/themes/stable/css/toolbar/toolbar.icons.theme.css b/core/themes/stable/css/toolbar/toolbar.icons.theme.css index 54942d5..2a0614a 100644 --- a/core/themes/stable/css/toolbar/toolbar.icons.theme.css +++ b/core/themes/stable/css/toolbar/toolbar.icons.theme.css @@ -219,7 +219,6 @@ background-color: #f5f5f5; } - /** * Handle. */ @@ -280,8 +279,7 @@ background-image: url(../../images/core/icons/bebebe/push-left.svg); /* LTR */ } .toolbar .toolbar-toggle-orientation [value="vertical"]:hover:before, -.toolbar .toolbar-toggle-orientation [value="vertical"]:focus:before - { +.toolbar .toolbar-toggle-orientation [value="vertical"]:focus:before { background-image: url(../../images/core/icons/787878/push-left.svg); /* LTR */ } [dir="rtl"] .toolbar .toolbar-toggle-orientation [value="vertical"]:before { diff --git a/core/themes/stable/css/toolbar/toolbar.theme.css b/core/themes/stable/css/toolbar/toolbar.theme.css index 981ee00..0b3afc9 100644 --- a/core/themes/stable/css/toolbar/toolbar.theme.css +++ b/core/themes/stable/css/toolbar/toolbar.theme.css @@ -20,7 +20,8 @@ line-height: 1em; text-decoration: none; } -.toolbar .toolbar-item:hover, .toolbar .toolbar-item:focus { +.toolbar .toolbar-item:hover, +.toolbar .toolbar-item:focus { text-decoration: underline; } @@ -93,8 +94,7 @@ .toolbar-tray a:hover, .toolbar-tray a:active, .toolbar-tray a:focus, -.toolbar-tray a.is-active - { +.toolbar-tray a.is-active { color: #000; text-decoration: underline; }