From 5ea5e7806060c0d3a20cc5e8a36c100daebb9219 Mon Sep 17 00:00:00 2001 From: Brandon Ferrua Date: Wed, 15 Jun 2016 13:31:46 -0700 Subject: [PATCH 1/2] move base styles to a root index file --- ui/components/_index.scss | 21 ++++--- .../badges/{flavors/base => }/_index.scss | 0 ui/components/breadcrumbs/_index.scss | 44 ++++++++++++++ .../{flavors/base => }/_index.scss | 0 .../cards/{flavors/base => }/_index.scss | 0 .../{flavors/form-element => }/_index.scss | 0 .../forms/flavors/form-element/config.yml | 4 -- .../form-element/index.react.example.jsx | 26 --------- ui/components/icons/_index.scss | 58 +++++++++++++++++++ .../background-colors => panels}/_index.scss | 16 ++++- 10 files changed, 126 insertions(+), 43 deletions(-) rename ui/components/badges/{flavors/base => }/_index.scss (100%) create mode 100644 ui/components/breadcrumbs/_index.scss rename ui/components/button-groups/{flavors/base => }/_index.scss (100%) rename ui/components/cards/{flavors/base => }/_index.scss (100%) rename ui/components/forms/{flavors/form-element => }/_index.scss (100%) delete mode 100644 ui/components/forms/flavors/form-element/config.yml delete mode 100644 ui/components/forms/flavors/form-element/index.react.example.jsx create mode 100644 ui/components/icons/_index.scss rename ui/components/{icons/flavors/background-colors => panels}/_index.scss (84%) diff --git a/ui/components/_index.scss b/ui/components/_index.scss index ee0acb01bc..2a1f1f5b35 100644 --- a/ui/components/_index.scss +++ b/ui/components/_index.scss @@ -14,11 +14,14 @@ // Activity Timeline 'activity-timeline/flavors/base/index', + // Badges + 'badges/index', + // Breadcrumbs - 'breadcrumbs/flavors/base/index', + 'breadcrumbs/index', // Button Groups - 'button-groups/flavors/base/index', + 'button-groups/index', // Button 'buttons/flavors/base/index', @@ -26,15 +29,15 @@ 'buttons/flavors/icon/index', // Icons - 'icons/flavors/base/index', + 'icons/index', 'icons/flavors/icon-colors/index', - 'icons/flavors/background-colors/index', 'icons/flavors/sizes/index', // Card - 'cards/flavors/base/index', + 'cards/index', // Forms + 'forms/index', 'forms/flavors/input/index', 'forms/flavors/textarea/index', 'forms/flavors/radio/index', @@ -45,13 +48,12 @@ 'forms/flavors/checkbox-alternate/index', 'forms/flavors/multi-select/index', 'forms/flavors/edit-dialog-for-touch/index', - 'forms/flavors/form-element/index', 'forms/flavors/horizontal-form/index', 'forms/flavors/stacked-form/index', 'forms/flavors/inline-form/index', 'forms/flavors/compound-form/index', - // Tooltip + // Tooltip - This is deprecated 'tooltips/flavors/base/index', // Page Headers @@ -59,7 +61,7 @@ 'page-headers/flavors/record-home/index', // Panels - 'panels/flavors/detail/index', + 'panels/index', // Popovers 'popovers/flavors/base/index', @@ -131,9 +133,6 @@ // Images 'images/flavors/avatar/index', - // Badges - 'badges/flavors/base/index', - // Tables 'data-tables/index', 'data-tables/flavors/responsive/index', diff --git a/ui/components/badges/flavors/base/_index.scss b/ui/components/badges/_index.scss similarity index 100% rename from ui/components/badges/flavors/base/_index.scss rename to ui/components/badges/_index.scss diff --git a/ui/components/breadcrumbs/_index.scss b/ui/components/breadcrumbs/_index.scss new file mode 100644 index 0000000000..2b6d4c4fa7 --- /dev/null +++ b/ui/components/breadcrumbs/_index.scss @@ -0,0 +1,44 @@ +// Copyright (c) 2015, salesforce.com, inc. All rights reserved. + +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +// Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +.#{$css-prefix}breadcrumb { + + .#{$css-prefix}list__item, + &__item { + position: relative; + + &:before { + content: '\003E'; + position: absolute; + left: (($spacing-x-small / 2) * -1); + } + + > a { + display: block; + padding: 0 $spacing-x-small; + + &:hover { + text-decoration: none; + } + } + + &:first-child { + + > a { + padding-left: 0; + } + + &:before { + content: ''; + } + } + } +} diff --git a/ui/components/button-groups/flavors/base/_index.scss b/ui/components/button-groups/_index.scss similarity index 100% rename from ui/components/button-groups/flavors/base/_index.scss rename to ui/components/button-groups/_index.scss diff --git a/ui/components/cards/flavors/base/_index.scss b/ui/components/cards/_index.scss similarity index 100% rename from ui/components/cards/flavors/base/_index.scss rename to ui/components/cards/_index.scss diff --git a/ui/components/forms/flavors/form-element/_index.scss b/ui/components/forms/_index.scss similarity index 100% rename from ui/components/forms/flavors/form-element/_index.scss rename to ui/components/forms/_index.scss diff --git a/ui/components/forms/flavors/form-element/config.yml b/ui/components/forms/flavors/form-element/config.yml deleted file mode 100644 index 8bbba0f893..0000000000 --- a/ui/components/forms/flavors/form-element/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -status: 'dev-ready' -className: 'form-element' -showFormFactors: - - large diff --git a/ui/components/forms/flavors/form-element/index.react.example.jsx b/ui/components/forms/flavors/form-element/index.react.example.jsx deleted file mode 100644 index 0fa0795cc7..0000000000 --- a/ui/components/forms/flavors/form-element/index.react.example.jsx +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright (c) 2015, salesforce.com, inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -import React from 'react'; -import Input from 'ui/components/forms/flavors/input/index.react'; -import { prefix as pf } from 'app_modules/ui/util/component'; - - -export const preview = ( - -); - -export const code = ( -
- -
Form Element
-
-); diff --git a/ui/components/icons/_index.scss b/ui/components/icons/_index.scss new file mode 100644 index 0000000000..5d08d36e76 --- /dev/null +++ b/ui/components/icons/_index.scss @@ -0,0 +1,58 @@ +// Copyright (c) 2015, salesforce.com, inc. All rights reserved. + +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +// Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +.#{$css-prefix}icon_container, +.#{$css-prefix}icon__container { + + @include deprecate('4.0.0', '#{$css-prefix}icon__container is deprecated. Use #{$css-prefix}icon_container instead.'); + display: inline-block; + border-radius: $border-radius-medium; + + &--circle { + padding: $spacing-x-small; + border-radius: $border-radius-circle; + } +} + +.#{$css-prefix}icon { + @include square($square-icon-medium-boundary); + border-radius: $border-radius-medium; + fill: $color-text-icon-inverse; +} + +@each $name, $color in $bg-actions-map { + .#{$css-prefix}icon-#{$name} { + background-color: $color; + } +} + +// TODO: Depend on a correct map to generate icons named slds-icon-custom-customXX +@each $name, $color in $bg-custom-map { + $prefix-length: str-length('custom-'); + // In Sass, str-slice's first character is 1 (instead of 0 in other languages) + // so we need to add +1 when slicing + $id: str-slice($name, $prefix-length + 1); + + // We generate both icons named: + // 1. slds-icon-custom-customXX (new: consistent with icon names) + // 2. slds-icon-custom-XX (legacy: depends on a map that is inconsistent with icon names) + @include deprecate('4.0.0', 'slds-icon-custom-XX classes are deprecated, use slds-icon-custom-customXX instead'); + .#{$css-prefix}icon-custom-custom#{$id}, + .#{$css-prefix}icon-#{$name} { + background-color: $color; + color: $color-text-inverse; // This is for text based icon created with just the first letters of the words + } +} + +@each $name, $color in $bg-standard-map { + .#{$css-prefix}icon-standard-#{$name} { + background-color: $color; + } +} diff --git a/ui/components/icons/flavors/background-colors/_index.scss b/ui/components/panels/_index.scss similarity index 84% rename from ui/components/icons/flavors/background-colors/_index.scss rename to ui/components/panels/_index.scss index ecb6471528..da9b6ce2de 100644 --- a/ui/components/icons/flavors/background-colors/_index.scss +++ b/ui/components/panels/_index.scss @@ -7,7 +7,19 @@ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.#{$css-prefix}panel { + background: $color-background-alt; + border-radius: $border-radius-medium; -.#{$css-prefix}icon-text-error { - fill: $color-text-error; + &__section { + padding: $spacing-medium; + } + + &__actions { + padding: $spacing-small; + } + + &.#{$css-prefix}is-editing { + box-shadow: $shadow-drop-down; + } } From d02ed1ffbba70dedf64769ebed9f661df63c0fde Mon Sep 17 00:00:00 2001 From: Brandon Ferrua Date: Wed, 15 Jun 2016 13:55:41 -0700 Subject: [PATCH 2/2] Move remaining shared styles to root index --- ui/components/_index.scss | 20 ++-- .../{flavors/base => }/_index.scss | 0 .../{flavors/base => }/_index.scss | 0 .../{flavors/base => }/_index.scss | 0 .../menus/{flavors/dropdown => }/_index.scss | 0 .../modals/{flavors/base => }/_index.scss | 0 .../{flavors/base => }/_index.scss | 0 .../pills/{flavors/base => }/_index.scss | 0 .../popovers/{flavors/base => }/_index.scss | 0 ui/components/publishers/_index.scss | 46 ++++++++ .../flavors/discussion-feed/_index.scss | 37 ------- ui/components/spinners/_index.scss | 102 ++++++++++++++++++ .../spinners/flavors/small/_index.scss | 92 ---------------- .../tiles/{flavors/base => }/_index.scss | 0 14 files changed, 159 insertions(+), 138 deletions(-) rename ui/components/activity-timeline/{flavors/base => }/_index.scss (100%) rename ui/components/datepickers/{flavors/base => }/_index.scss (100%) rename ui/components/docked-composer/{flavors/base => }/_index.scss (100%) rename ui/components/menus/{flavors/dropdown => }/_index.scss (100%) rename ui/components/modals/{flavors/base => }/_index.scss (100%) rename ui/components/page-headers/{flavors/base => }/_index.scss (100%) rename ui/components/pills/{flavors/base => }/_index.scss (100%) rename ui/components/popovers/{flavors/base => }/_index.scss (100%) create mode 100644 ui/components/publishers/_index.scss create mode 100644 ui/components/spinners/_index.scss rename ui/components/tiles/{flavors/base => }/_index.scss (100%) diff --git a/ui/components/_index.scss b/ui/components/_index.scss index 2a1f1f5b35..ec75c6a67a 100644 --- a/ui/components/_index.scss +++ b/ui/components/_index.scss @@ -12,7 +12,7 @@ @import // Activity Timeline - 'activity-timeline/flavors/base/index', + 'activity-timeline/index', // Badges 'badges/index', @@ -57,34 +57,35 @@ 'tooltips/flavors/base/index', // Page Headers - 'page-headers/flavors/base/index', + 'page-headers/index', 'page-headers/flavors/record-home/index', // Panels 'panels/index', // Popovers - 'popovers/flavors/base/index', + 'popovers/index', 'popovers/flavors/tooltips/index', 'popovers/flavors/panels/index', 'popovers/flavors/nubbins/index', // Menus - 'menus/flavors/dropdown/index', + 'menus/index', 'menus/flavors/picklist/index', 'menus/flavors/action-overflow/index', 'menus/flavors/action-overflow-for-touch/index', // Datepicker - 'datepickers/flavors/base/index', + 'datepickers/index', 'datepickers/flavors/time/index', // Docked Composer - 'docked-composer/flavors/base/index', + 'docked-composer/index', 'docked-composer/flavors/email/index', 'docked-composer/flavors/task/index', // Publishers + 'publishers/index', 'publishers/flavors/discussion-feed/index', 'publishers/flavors/comment/index', @@ -93,16 +94,17 @@ 'feeds/flavors/comment/index', // Modal - 'modals/flavors/base/index', + 'modals/index', // Pills - 'pills/flavors/base/index', + 'pills/index', // Process 'process/flavors/wizard/index', 'process/flavors/sales-path-coach/index', // Spinners + 'spinners/index', 'spinners/flavors/small/index', 'spinners/flavors/medium/index', 'spinners/flavors/large/index', @@ -110,7 +112,7 @@ 'spinners/flavors/inverse-small/index', // Title - 'tiles/flavors/base/index', + 'tiles/index', 'tiles/flavors/board/index', // Tabs diff --git a/ui/components/activity-timeline/flavors/base/_index.scss b/ui/components/activity-timeline/_index.scss similarity index 100% rename from ui/components/activity-timeline/flavors/base/_index.scss rename to ui/components/activity-timeline/_index.scss diff --git a/ui/components/datepickers/flavors/base/_index.scss b/ui/components/datepickers/_index.scss similarity index 100% rename from ui/components/datepickers/flavors/base/_index.scss rename to ui/components/datepickers/_index.scss diff --git a/ui/components/docked-composer/flavors/base/_index.scss b/ui/components/docked-composer/_index.scss similarity index 100% rename from ui/components/docked-composer/flavors/base/_index.scss rename to ui/components/docked-composer/_index.scss diff --git a/ui/components/menus/flavors/dropdown/_index.scss b/ui/components/menus/_index.scss similarity index 100% rename from ui/components/menus/flavors/dropdown/_index.scss rename to ui/components/menus/_index.scss diff --git a/ui/components/modals/flavors/base/_index.scss b/ui/components/modals/_index.scss similarity index 100% rename from ui/components/modals/flavors/base/_index.scss rename to ui/components/modals/_index.scss diff --git a/ui/components/page-headers/flavors/base/_index.scss b/ui/components/page-headers/_index.scss similarity index 100% rename from ui/components/page-headers/flavors/base/_index.scss rename to ui/components/page-headers/_index.scss diff --git a/ui/components/pills/flavors/base/_index.scss b/ui/components/pills/_index.scss similarity index 100% rename from ui/components/pills/flavors/base/_index.scss rename to ui/components/pills/_index.scss diff --git a/ui/components/popovers/flavors/base/_index.scss b/ui/components/popovers/_index.scss similarity index 100% rename from ui/components/popovers/flavors/base/_index.scss rename to ui/components/popovers/_index.scss diff --git a/ui/components/publishers/_index.scss b/ui/components/publishers/_index.scss new file mode 100644 index 0000000000..164407467c --- /dev/null +++ b/ui/components/publishers/_index.scss @@ -0,0 +1,46 @@ +// Copyright (c) 2015, salesforce.com, inc. All rights reserved. + +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +// Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +.#{$css-prefix}publisher { + + &.#{$css-prefix}is-active { + + .#{$css-prefix}publisher__toggle-visibility { + display: inherit; + } + + .#{$css-prefix}publisher__input { + line-height: $line-height-text; + height: auto; + max-height: 10rem; + resize: vertical; + padding: { + top: $spacing-small; + bottom: $spacing-small; + } + } + } + + &__input { + line-height: $line-height-button; + padding: 0 $spacing-medium; + resize: none; + min-height: calc(#{$line-height-button} + 2px); + max-height: calc(#{$line-height-button} + 2px); + width: 100%; + } + + &__actions > .#{$css-prefix}button { + margin-left: $spacing-small; + } + + .#{$css-prefix}publisher__toggle-visibility { + display: none; + } +} diff --git a/ui/components/publishers/flavors/discussion-feed/_index.scss b/ui/components/publishers/flavors/discussion-feed/_index.scss index ac6efe2ba1..778dafcbbb 100644 --- a/ui/components/publishers/flavors/discussion-feed/_index.scss +++ b/ui/components/publishers/flavors/discussion-feed/_index.scss @@ -7,43 +7,6 @@ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.#{$css-prefix}publisher { - - &.#{$css-prefix}is-active { - - .#{$css-prefix}publisher__toggle-visibility { - display: inherit; - } - - .#{$css-prefix}publisher__input { - line-height: $line-height-text; - height: auto; - max-height: 10rem; - resize: vertical; - padding: { - top: $spacing-small; - bottom: $spacing-small; - } - } - } - - &__input { - line-height: $line-height-button; - padding: 0 $spacing-medium; - resize: none; - min-height: calc(#{$line-height-button} + 2px); - max-height: calc(#{$line-height-button} + 2px); - width: 100%; - } - - &__actions > .#{$css-prefix}button { - margin-left: $spacing-small; - } - - .#{$css-prefix}publisher__toggle-visibility { - display: none; - } -} .#{$css-prefix}publisher--discussion { display: flex; diff --git a/ui/components/spinners/_index.scss b/ui/components/spinners/_index.scss new file mode 100644 index 0000000000..407373ec64 --- /dev/null +++ b/ui/components/spinners/_index.scss @@ -0,0 +1,102 @@ +// Copyright (c) 2015, salesforce.com, inc. All rights reserved. + +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +// Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +.#{$css-prefix}spinner_container { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: calc(#{$z-index-modal} + 2); + background-color: $color-background-temp-modal-tint-alt; + visibility: visible; + opacity: 1; + transition: opacity 0.2s ease, visibility 0s; + transition-delay: 0s, 0.3s; +} + +.#{$css-prefix}spinner_container.is-hidden { + visibility: hidden; + opacity: 0; + transition: opacity 0.2s ease, visibility 0s; + transition-delay: 0s, 0s; +} + +.#{$css-prefix}spinner_container.hide { + display: none; +} + +.#{$css-prefix}spinner { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) rotate(90deg); +} + +.#{$css-prefix}spinner, +.#{$css-prefix}spinner__dot-a, +.#{$css-prefix}spinner__dot-b { + transform-origin: 50% 50%; +} + +.#{$css-prefix}spinner__dot-a, +.#{$css-prefix}spinner__dot-b { + position: absolute; + top: 0; + left: 0; + width: 100%; +} + +.#{$css-prefix}spinner:before, +.#{$css-prefix}spinner:after, +.#{$css-prefix}spinner__dot-a:before, +.#{$css-prefix}spinner__dot-b:before, +.#{$css-prefix}spinner__dot-a:after, +.#{$css-prefix}spinner__dot-b:after { + position: absolute; + content: ''; + background: $color-background-indicator-dot; + border-radius: $border-radius-circle; + animation-duration: 1000ms; + animation-iteration-count: infinite; +} + +.#{$css-prefix}spinner__dot-a { + transform: rotate(60deg) translateY(0); +} + +.#{$css-prefix}spinner__dot-b { + transform: rotate(120deg) translateY(0); +} + +.#{$css-prefix}spinner:before { + animation-delay: -83.33333ms; +} + +.#{$css-prefix}spinner__dot-a:before { + animation-delay: 83.33333ms; +} + +.#{$css-prefix}spinner__dot-b:before { + animation-delay: 250ms; +} + +.#{$css-prefix}spinner:after { + animation-delay: 416.66667ms; +} + +.#{$css-prefix}spinner__dot-a:after { + animation-delay: 583.33333ms; +} + +.#{$css-prefix}spinner__dot-b:after { + animation-delay: 750ms; +} diff --git a/ui/components/spinners/flavors/small/_index.scss b/ui/components/spinners/flavors/small/_index.scss index fd253d68e6..0b89544dfd 100644 --- a/ui/components/spinners/flavors/small/_index.scss +++ b/ui/components/spinners/flavors/small/_index.scss @@ -9,98 +9,6 @@ -.#{$css-prefix}spinner_container { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: calc(#{$z-index-modal} + 2); - background-color: $color-background-temp-modal-tint-alt; - visibility: visible; - opacity: 1; - transition: opacity 0.2s ease, visibility 0s; - transition-delay: 0s, 0.3s; -} - -.#{$css-prefix}spinner_container.is-hidden { - visibility: hidden; - opacity: 0; - transition: opacity 0.2s ease, visibility 0s; - transition-delay: 0s, 0s; -} - -.#{$css-prefix}spinner_container.hide { - display: none; -} - -.#{$css-prefix}spinner { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%) rotate(90deg); -} - -.#{$css-prefix}spinner, -.#{$css-prefix}spinner__dot-a, -.#{$css-prefix}spinner__dot-b { - transform-origin: 50% 50%; -} - -.#{$css-prefix}spinner__dot-a, -.#{$css-prefix}spinner__dot-b { - position: absolute; - top: 0; - left: 0; - width: 100%; -} - -.#{$css-prefix}spinner:before, -.#{$css-prefix}spinner:after, -.#{$css-prefix}spinner__dot-a:before, -.#{$css-prefix}spinner__dot-b:before, -.#{$css-prefix}spinner__dot-a:after, -.#{$css-prefix}spinner__dot-b:after { - position: absolute; - content: ''; - background: $color-background-indicator-dot; - border-radius: $border-radius-circle; - animation-duration: 1000ms; - animation-iteration-count: infinite; -} - -.#{$css-prefix}spinner__dot-a { - transform: rotate(60deg) translateY(0); -} - -.#{$css-prefix}spinner__dot-b { - transform: rotate(120deg) translateY(0); -} - -.#{$css-prefix}spinner:before { - animation-delay: -83.33333ms; -} - -.#{$css-prefix}spinner__dot-a:before { - animation-delay: 83.33333ms; -} - -.#{$css-prefix}spinner__dot-b:before { - animation-delay: 250ms; -} - -.#{$css-prefix}spinner:after { - animation-delay: 416.66667ms; -} - -.#{$css-prefix}spinner__dot-a:after { - animation-delay: 583.33333ms; -} - -.#{$css-prefix}spinner__dot-b:after { - animation-delay: 750ms; -} - .#{$css-prefix}spinner--small { width: 1.25rem; diff --git a/ui/components/tiles/flavors/base/_index.scss b/ui/components/tiles/_index.scss similarity index 100% rename from ui/components/tiles/flavors/base/_index.scss rename to ui/components/tiles/_index.scss