Interactive interface for browsing global, full-resolution satellite imagery
1975 bring in postcss-nesting plugin and do some minor refactor in timeline.css to verify plugin is working as expected
Jason Kentb6ef0bea6806
diff --git a/.stylelintrc b/.stylelintrcindex 99677e168..c6afa80e0 100644--- a/.stylelintrc+++ b/.stylelintrc@@ -24,7 +24,7 @@"media-feature-name-no-unknown": true,"at-rule-no-unknown": true,"comment-no-empty": true,- "max-nesting-depth": [1, {+ "max-nesting-depth": [5, {ignore: "blockless-at-rules"}],"no-duplicate-selectors": true,diff --git a/package-lock.json b/package-lock.jsonindex 2c798877e..36964af6d 100644--- a/package-lock.json+++ b/package-lock.json@@ -14246,9 +14246,9 @@}},"postcss-nesting": {- "version": "7.0.0",- "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-7.0.0.tgz",- "integrity": "sha512-WSsbVd5Ampi3Y0nk/SKr5+K34n52PqMqEfswu6RtU4r7wA8vSD+gM8/D9qq4aJkHImwn1+9iEFTbjoWsQeqtaQ==",+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-7.0.1.tgz",+ "integrity": "sha512-FrorPb0H3nuVq0Sff7W2rnc3SmIcruVC6YwpcS+k687VxyxO33iE1amna7wHuRVzM8vfiYofXSBHNAZ3QhLvYg==","dev": true,"requires": {"postcss": "^7.0.2"diff --git a/package.json b/package.jsonindex 308d681c6..88e6ac7e7 100644--- a/package.json+++ b/package.json@@ -118,6 +118,7 @@"postcss-import": "^12.0.1","postcss-less": "^3.1.0","postcss-loader": "^2.1.6",+ "postcss-nesting": "^7.0.1","postcss-preset-env": "^6.6.0","postcss-url": "^7.2.1","precss": "^3.1.2",diff --git a/web/css/timeline.css b/web/css/timeline.cssindex 9c5ca2a14..62a061b2c 100644--- a/web/css/timeline.css+++ b/web/css/timeline.css@@ -24,120 +24,207 @@ button:focus {margin-top: 2px;min-width: 310px;display: inline-block;-}--#timeline-header.subdaily {- width: 414px;-}--#timeline-header .timeline-interval,-#timeline-header .input-wrapper-hour,-#timeline-header .input-time-divider,-#timeline-header .input-wrapper-minute,-#timeline-header .input-time-zmark,-#timeline-header .zoom-minutes,-#timeline-header .zoom-hours {- display: none;-}--#timeline-header.subdaily .zoom-minutes,-#timeline-header.subdaily .zoom-hours {- display: block;-}--#timeline-header.subdaily .timeline-interval,-#timeline-header.subdaily .input-wrapper-hour,-#timeline-header.subdaily .input-time-divider,-#timeline-header.subdaily .input-wrapper-minute,-#timeline-header.subdaily .input-time-zmark {- display: inline-block;-}--#timeline-header .input-wrapper {- background: transparent;- border: 1px solid transparent;- vertical-align: top;- box-sizing: border-box;- -webkit-box-sizing: border-box;- margin: 0 2px;-}--#timeline-header .input-wrapper-year {- max-width: 62px;-}--#timeline-header .input-wrapper-month {- max-width: 46px;-}--#timeline-header .input-wrapper-day {- max-width: 32px;-}--#timeline-header .input-wrapper-hour,-#timeline-header .input-wrapper-minute {- width: 32px;-}--#timeline-header .input-wrapper-hour {- margin-left: 8px;-}--#timeline-header input {- width: 100%;- height: 40px;- color: #fff;- opacity: 1;- font-size: 24px;- background: transparent;- border: 0;- font-family: 'Roboto Mono', monospace;- line-height: 1.2em;- vertical-align: baseline;- box-sizing: border-box;- -moz-box-sizing: border-box;- -webkit-box-sizing: border-box;- padding: 0;-}--#timeline-header .input-wrapper:hover {- border-color: #666;-}--#timeline-header .input-wrapper:hover .date-arrows {- visibility: visible;-}--#timeline-header .input-wrapper:hover .date-arrows svg path {- fill: #888;-}--#timeline-header .input-wrapper.selected {- border-color: #fff;-}--#timeline-header .input-wrapper.selected .date-arrows svg path {- fill: #fff;-}--#timeline-header div {- display: inline-block;- vertical-align: top;-}-#timeline-header .input-time-divider {- font-family: 'Roboto Mono', monospace;- color: #fff;- font-size: 24px;- width: 13px;- margin-top: 23px;-}--#timeline-header .input-time-zmark {- font-family: 'Roboto Mono', monospace;- color: #fff;- font-size: 24px;- margin-top: 25px;+ &.subdaily {+ width: 414px;+ & .zoom-minutes,+ & .zoom-hours {+ display: block;+ }+ & .timeline-interval,+ & .input-wrapper-hour,+ & .input-time-divider,+ & .input-wrapper-minute,+ & .input-time-zmark {+ display: inline-block;+ }+ }++ & .input-wrapper {+ background: transparent;+ border: 1px solid transparent;+ vertical-align: top;+ box-sizing: border-box;+ -webkit-box-sizing: border-box;+ margin: 0 2px;+ }+ & .input-wrapper-year {+ max-width: 62px;+ }+ & .input-wrapper-month {+ max-width: 46px;+ }+ & .input-wrapper-day {+ max-width: 32px;+ }+ & .input-wrapper-hour,+ & .input-wrapper-minute {+ width: 32px;+ }+ & .input-wrapper-hour {+ margin-left: 8px;+ }+ & div {+ display: inline-block;+ vertical-align: top;+ }+ & input {+ width: 100%;+ height: 40px;+ color: #fff;+ opacity: 1;+ font-size: 24px;+ background: transparent;+ border: 0;+ font-family: 'Roboto Mono', monospace;+ line-height: 1.2em;+ vertical-align: baseline;+ box-sizing: border-box;+ -moz-box-sizing: border-box;+ -webkit-box-sizing: border-box;+ padding: 0;+ }++ & .timeline-interval,+ & .input-wrapper-hour,+ & .input-time-divider,+ & .input-wrapper-minute,+ & .input-time-zmark,+ & .zoom-minutes,+ & .zoom-hours {+ display: none;+ }++ & .input-wrapper:hover {+ border-color: #666;+ }+ & .input-wrapper:hover .date-arrows {+ visibility: visible;+ }+ & .input-wrapper:hover .date-arrows svg path {+ fill: #888;+ }+ & .input-wrapper.selected {+ border-color: #fff;+ }+ & .input-wrapper.selected .date-arrows svg path {+ fill: #fff;+ }++ & .input-time-divider {+ font-family: 'Roboto Mono', monospace;+ color: #fff;+ font-size: 24px;+ width: 13px;+ margin-top: 23px;+ }+ & .input-time-zmark {+ font-family: 'Roboto Mono', monospace;+ color: #fff;+ font-size: 24px;+ margin-top: 25px;+ }+ & .date-arrows {+ display: block;+ height: 10px;+ }+ & .date-arrows svg {+ vertical-align: top;+ display: block;+ margin: 0 auto;+ }+ & .date-arrows svg path {+ fill: #666;+ }++ & .input-wrapper:hover .date-arrows:hover svg path {+ fill: #1a1a1a;+ }++ & .date-arrow-down {+ -webkit-transform: scaleY(-1);+ transform: scaleY(-1);+ -webkit-filter: FlipV;+ filter: FlipV;+ -ms-filter: 'FlipV';+ }++ & .date-arrows:hover,+ & > .button-action-group:hover,+ & #zoom-buttons-group .button-action-group:hover {+ background-color: #fff;+ cursor: pointer;+ }+ & > .button-action-group .button-disabled:hover,+ & #zoom-buttons-group .button-disabled:hover {+ background-color: transparent;+ cursor: default;+ }+ & .button-action-group svg {+ position: absolute;+ top: 50%;+ margin-top: -15px;+ left: 50%;+ margin-left: -12px;+ }++ & #left-arrow-group {+ -webkit-transform: scaleX(-1);+ transform: scaleX(-1);+ }+ & #left-arrow-group svg {+ -webkit-filter: FlipH;+ filter: FlipH;+ -ms-filter: 'FlipH';+ }++ & > .button-action-group:hover .arrow,+ & #zoom-buttons-group .button-action-group:hover .arrow {+ fill: #1a1a1a;+ fill-opacity: 1;+ stroke: none;+ }+ & > .button-action-group.button-disabled .arrow,+ & #zoom-buttons-group .button-disabled .arrow {+ fill: #333;+ }+ & > .button-action-group.button-disabled:hover .arrow,+ & #zoom-buttons-group .button-disabled:hover .arrow {+ fill: #333;+ }++ & .animate-button {+ margin-top: 10px;+ height: 40px;+ width: 40px;+ }+ & .animate-button .wv-animate {+ color: #fff;+ font-size: 2.5em;+ margin: 5px 0 0 2px;+ }+ & .animate-button:hover .wv-animate {+ color: #1a1a1a;+ }+ & .animate-button.wv-disabled-button {+ cursor: auto;+ pointer-events: auto;+ }+ & .animate-button.wv-disabled-button:hover {+ background-color: transparent;+ }+ & .animate-button.wv-disabled-button:hover .wv-animate {+ opacity: 0.5;+ color: #fff;+ }+ & .animate-button.wv-disabled-button .wv-animate {+ opacity: 0.5;+ pointer-events: none;+ }++ &.button-action-group svg path {+ fill: #fff;+ }}#zoom-buttons-group {@@ -152,121 +239,10 @@ button:focus {position: relative;}-#timeline-header .button-action-group svg path {- fill: #fff;-}-.date-arrow-wrapper {width: 60px;}-#timeline-header .date-arrows {- display: block;- height: 10px;-}--#timeline-header .date-arrows svg {- vertical-align: top;- display: block;- margin: 0 auto;-}--#timeline-header .date-arrows svg path {- fill: #666;-}--#timeline-header .input-wrapper:hover .date-arrows:hover svg path {- fill: #1a1a1a;-}--#timeline-header .date-arrow-down {- -webkit-transform: scaleY(-1);- transform: scaleY(-1);- -webkit-filter: FlipV;- filter: FlipV;- -ms-filter: 'FlipV';-}--#timeline-header .date-arrows:hover,-#timeline-header > .button-action-group:hover,-#timeline-header #zoom-buttons-group .button-action-group:hover {- background-color: #fff;- cursor: pointer;-}--#timeline-header > .button-action-group .button-disabled:hover,-#timeline-header #zoom-buttons-group .button-disabled:hover {- background-color: transparent;- cursor: default;-}--#timeline-header .button-action-group svg {- position: absolute;- top: 50%;- margin-top: -15px;- left: 50%;- margin-left: -12px;-}--#timeline-header #left-arrow-group {- -webkit-transform: scaleX(-1);- transform: scaleX(-1);-}--#timeline-header #left-arrow-group svg {- -webkit-filter: FlipH;- filter: FlipH;- -ms-filter: 'FlipH';-}--#timeline-header > .button-action-group:hover .arrow,-#timeline-header #zoom-buttons-group .button-action-group:hover .arrow {- fill: #1a1a1a;- fill-opacity: 1;- stroke: none;-}--#timeline-header > .button-action-group.button-disabled .arrow,-#timeline-header #zoom-buttons-group .button-disabled .arrow {- fill: #333;-}--#timeline-header > .button-action-group.button-disabled:hover .arrow,-#timeline-header #zoom-buttons-group .button-disabled:hover .arrow {- fill: #333;-}--#timeline-header .animate-button {- margin-top: 10px;- height: 40px;- width: 40px;-}-#timeline-header .animate-button .wv-animate {- color: #fff;- font-size: 2.5em;- margin: 5px 0 0 2px;-}--#timeline-header .animate-button:hover .wv-animate {- color: #1a1a1a;-}--#timeline-header .animate-button.wv-disabled-button {- cursor: auto;- pointer-events: auto;-}-#timeline-header .animate-button.wv-disabled-button:hover {- background-color: transparent;-}-#timeline-header .animate-button.wv-disabled-button:hover .wv-animate {- opacity: 0.5;- color: #fff;-}-#timeline-header .animate-button.wv-disabled-button .wv-animate {- opacity: 0.5;- pointer-events: none;-}-#timeline-header,#timeline-footer {float: left;diff --git a/webpack.config.js b/webpack.config.jsindex 2873196ab..f1adf19d6 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -6,6 +6,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');const WriteFilePlugin = require('write-file-webpack-plugin');const CopyWebpackPlugin = require('copy-webpack-plugin');const postcssPresetEnv = require('postcss-preset-env');+const postcssNesting = require('postcss-nesting');// production optimizationsconst OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');@@ -183,7 +184,8 @@ module.exports = {'not edge < 15','> 2%']- })+ }),+ postcssNesting()]}},