From 55ea020ae2400cc56a46dd94528cac8c3889c301 Mon Sep 17 00:00:00 2001 From: Nick Hwang Date: Thu, 21 May 2015 17:30:27 -0400 Subject: [PATCH] Twipsy theme --- dist/css/drop-theme-twipsy.css | 122 +++++++++++++++++++++++++++++++++ src/css/drop-theme-twipsy.sass | 30 ++++++++ 2 files changed, 152 insertions(+) create mode 100644 dist/css/drop-theme-twipsy.css create mode 100644 src/css/drop-theme-twipsy.sass diff --git a/dist/css/drop-theme-twipsy.css b/dist/css/drop-theme-twipsy.css new file mode 100644 index 0000000..6a932bb --- /dev/null +++ b/dist/css/drop-theme-twipsy.css @@ -0,0 +1,122 @@ +.drop-element, .drop-element:after, .drop-element:before, .drop-element *, .drop-element *:after, .drop-element *:before { + box-sizing: border-box; } + +.drop-element { + position: absolute; + display: none; } + .drop-element.drop-open { + display: block; } + +.drop-element.drop-theme-twipsy { + max-width: 100%; + max-height: 100%; } + .drop-element.drop-theme-twipsy .drop-content { + border-radius: 5px; + position: relative; + font-family: inherit; + background: #414141; + color: #fff; + padding: 1em; + font-size: 1.1em; + line-height: 1.5em; } + .drop-element.drop-theme-twipsy .drop-content:before { + content: ""; + display: block; + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-width: 10px; + border-style: solid; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-center .drop-content { + margin-bottom: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-center .drop-content:before { + top: 100%; + left: 50%; + margin-left: -10px; + border-top-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-center .drop-content { + margin-top: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-center .drop-content:before { + bottom: 100%; + left: 50%; + margin-left: -10px; + border-bottom-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-right.drop-element-attached-middle .drop-content { + margin-right: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-right.drop-element-attached-middle .drop-content:before { + left: 100%; + top: 50%; + margin-top: -10px; + border-left-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-left.drop-element-attached-middle .drop-content { + margin-left: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-left.drop-element-attached-middle .drop-content:before { + right: 100%; + top: 50%; + margin-top: -10px; + border-right-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-left.drop-target-attached-bottom .drop-content { + margin-top: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-left.drop-target-attached-bottom .drop-content:before { + bottom: 100%; + left: 10px; + border-bottom-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-right.drop-target-attached-bottom .drop-content { + margin-top: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-right.drop-target-attached-bottom .drop-content:before { + bottom: 100%; + right: 10px; + border-bottom-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-top .drop-content { + margin-bottom: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-top .drop-content:before { + top: 100%; + left: 10px; + border-top-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-top .drop-content { + margin-bottom: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-top .drop-content:before { + top: 100%; + right: 10px; + border-top-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-right.drop-target-attached-left .drop-content { + margin-right: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-right.drop-target-attached-left .drop-content:before { + top: 10px; + left: 100%; + border-left-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-left.drop-target-attached-right .drop-content { + margin-left: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-top.drop-element-attached-left.drop-target-attached-right .drop-content:before { + top: 10px; + right: 100%; + border-right-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-left .drop-content { + margin-right: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-left .drop-content:before { + bottom: 10px; + left: 100%; + border-left-color: #414141; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-right .drop-content { + margin-left: 10px; } + .drop-element.drop-theme-twipsy.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-right .drop-content:before { + bottom: 10px; + right: 100%; + border-right-color: #414141; } + +.drop-element.drop-theme-twipsy { + opacity: 0; + -webkit-transition: opacity 150ms; + transition: opacity 150ms; } + .drop-element.drop-theme-twipsy .drop-content { + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2); + border-radius: 2px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + padding: 3px 8px; + line-height: 18px; + font-size: 11px; } + .drop-element.drop-theme-twipsy.drop-open-transitionend { + display: block; } + .drop-element.drop-theme-twipsy.drop-after-open { + opacity: 1; } diff --git a/src/css/drop-theme-twipsy.sass b/src/css/drop-theme-twipsy.sass new file mode 100644 index 0000000..88e9c44 --- /dev/null +++ b/src/css/drop-theme-twipsy.sass @@ -0,0 +1,30 @@ +@import ../bower_components/tether/sass/helpers/tether +@import ../bower_components/tether/sass/helpers/tether-theme-arrows + +$themePrefix: "drop" +$themeName: "twipsy" +$arrowSize: 10px +$backgroundColor: #414141 +$color: #fff +$useDropShadow: false + ++tether($themePrefix: $themePrefix) ++tether-theme-arrows($themePrefix: $themePrefix, $themeName: $themeName, $arrowSize: $arrowSize, $backgroundColor: $backgroundColor, $color: $color, $useDropShadow: $useDropShadow) + +.drop-element.drop-theme-twipsy + opacity: 0 + transition: opacity 150ms + + .drop-content + box-shadow: 0 3px 7px rgba(0, 0, 0, .2) + border-radius: 2px + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif + padding: 3px 8px + line-height: 18px + font-size: 11px + + &.drop-open-transitionend + display: block + + &.drop-after-open + opacity: 1