diff options
author | Sam Potts <sam@potts.es> | 2018-03-17 23:30:16 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-03-17 23:30:16 +1100 |
commit | 600f0eb8a3cf49f5268e5c15487797d496bc19b6 (patch) | |
tree | ae7d43ee753035458e5927b66eb588ff26d58afd /demo/src/sass/components/buttons.scss | |
parent | e0562752eaa4553466b78fb6828d05147a0891d1 (diff) | |
parent | 5db73b13276bf50357cc98896421318de66ab042 (diff) | |
download | plyr-600f0eb8a3cf49f5268e5c15487797d496bc19b6.tar.lz plyr-600f0eb8a3cf49f5268e5c15487797d496bc19b6.tar.xz plyr-600f0eb8a3cf49f5268e5c15487797d496bc19b6.zip |
Merge branch 'beta'
# Conflicts:
# readme.md
Diffstat (limited to 'demo/src/sass/components/buttons.scss')
-rw-r--r-- | demo/src/sass/components/buttons.scss | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/demo/src/sass/components/buttons.scss b/demo/src/sass/components/buttons.scss new file mode 100644 index 00000000..1b2d652e --- /dev/null +++ b/demo/src/sass/components/buttons.scss @@ -0,0 +1,83 @@ +// ========================================================================== +// Buttons +// ========================================================================== + +// Shared +.button, +.button__count { + align-items: center; + background: $color-button-background; + border: 0; + border-radius: $border-radius-base; + box-shadow: 0 1px 1px rgba(#000, 0.1); + color: $color-button-text; + display: inline-flex; + padding: ($spacing-base * 0.75); + position: relative; + text-shadow: none; + user-select: none; + vertical-align: middle; +} + +// Buttons +.button { + font-weight: $font-weight-bold; + padding-left: $spacing-base; + padding-right: $spacing-base; + transition: all 0.2s ease; + + &:hover, + &:focus { + color: $gray-dark; + + // Remove the underline/border + &::after { + display: none; + } + } + + &:hover { + box-shadow: 0 2px 2px rgba(#000, 0.1); + transform: translateY(-1px); + } + + &:focus { + outline: 0; + } + + &.tab-focus { + @include tab-focus(); + } + + &:active { + transform: translateY(1px); + } +} + +// Button group +.button--with-count { + display: inline-flex; + + .button .icon { + flex-shrink: 0; + } +} + +// Count bubble +.button__count { + animation: fadein 0.2s ease; + margin-left: ($spacing-base / 2); + + &::before { + border: $arrow-size solid transparent; + border-left-width: 0; + border-right-color: $color-button-background; + content: ''; + height: 0; + position: absolute; + right: 100%; + top: 50%; + transform: translateY(-50%); + width: 0; + } +} |