123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
-
- :root {
- --fab-width: 56px;
- --fab-height: 56px;
- --fab-position: absolute;
- --fab-mini-width: 40px;
- --fab-mini-height: 40px;
-
- --material-fab-width: 56px;
- --material-fab-height: 56px;
- --material-fab-position: absolute;
- --material-fab-mini-width: 40px;
- --material-fab-mini-height: 40px;
-
- --fab: {
- position: relative;
- display: inline-block;
- @apply(--reset-box-model);
- @apply(--reset-base);
- @apply(--reset-font);
- @apply(--reset-cursor);
- width: var(--fab-width);
- height: var(--fab-height);
- text-decoration: none;
- font-size: 25px;
- line-height: var(--fab-height);
- letter-spacing: 0;
- color: var(--fab-text-color);
- vertical-align: middle;
- text-align: center;
- background-color: var(--fab-background-color);
- border: 0 solid currentColor;
- border-radius: 50%;
- overflow: hidden;
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
- transition: all 0.1s linear;
- }
-
- --material-fab: {
- @apply(--fab);
- @apply(--material-font);
- width: var(--material-fab-width);
- height: var(--material-fab-height);
- text-decoration: none;
- font-size: 25px;
- line-height: var(--material-fab-height);
- color: var(--material-fab-text-color);
- background-color: var(--material-fab-background-color);
- @apply(--material-shadow-2);
- transition: all 0.2s ease-in-out;
- }
-
- --fab--focus: {
- outline: 0;
- }
-
- --material-fab--focus: {
- outline: 0;
- }
-
- --fab--active: {
- box-shadow: 0 3px 6 rgba(0, 0, 0, 0.12);
- background-color: var(--fab-active-background-color);
- transition: all 0.2s ease;
- }
-
- --material-fab--active: {
- @apply(--material-shadow-4);
- background-color: var(--material-fab-active-background-color);
- transition: all 0.2s ease;
- }
-
- --fab--disabled: {
- background-color: color(black alpha(50%));
- @apply(--material-shadow-0);
- @apply(--disabled);
- }
-
- --material-fab--disabled: {
- background-color: color(black alpha(50%));
- @apply(--material-shadow-0);
- @apply(--disabled);
- }
- }
-
- /*~
- name: Fab
- category: Fab
- elements: ons-fab
- markup: |
- <button class="fab"><i class="zmdi zmdi-car"></i></button>
- <button class="fab" disabled><i class="zmdi zmdi-car"></i></button>
- */
- /* stylelint-disable */
- ons-fab, ons-speed-dial-item, button {
- &.fab {
- @apply(--fab);
- &:active {
- @apply(--fab--active);
- box-shadow: 0 0 6 rgba(0, 0, 0, 0.12);
- }
- &:focus {
- @apply(--fab--focus);
- }
- &:disabled,
- &[disabled] {
- @apply(--material-fab--disabled);
- }
- }
-
- &.fab__icon {
- position: relative;
- overflow: hidden;
- height: 100%;
- width: 100%;
- display: block;
- border-radius: 100%;
- padding: 0;
- z-index: 100;
- line-height: var(--material-fab-height);
- }
- }
- /* stylelint-enable */
-
- /*~
- name: Material Fab
- category: Fab
- elements: ons-fab
- markup: |
- <button class="fab fab--material"><i class="zmdi zmdi-car"></i></button>
- <button class="fab fab--material" disabled><i class="zmdi zmdi-car"></i></button>
- */
-
- /* stylelint-disable */
- ons-fab, ons-speed-dial-item, button {
- &.fab--material {
- @apply(--material-fab);
- }
-
- &.fab--material:active {
- @apply(--material-fab--active);
- }
-
- &.fab--material:focus {
- @apply(--material-fab--focus);
- }
-
- &.fab--material__icon {
- position: relative;
- overflow: hidden;
- height: 100%;
- width: 100%;
- display: block;
- border-radius: 100%;
- padding: 0;
- z-index: 100;
- line-height: var(--material-fab-height);
- }
-
- &.fab--material:disabled,
- &.fab--material[disabled] {
- @apply(--material-fab--disabled);
- }
- }
- /* stylelint-enable */
-
- /*~
- name: Fab Mini
- category: Fab
- elements: ons-fab
- markup: |
- <button class="fab fab--mini"><i class="zmdi zmdi-plus"></i></button>
- <button class="fab fab--mini" disabled><i class="zmdi zmdi-plus"></i></button>
- */
-
- /*~
- name: Material Fab Mini
- category: Fab
- elements: ons-fab
- markup: |
- <button class="fab fab--material fab--mini"><i class="zmdi zmdi-plus"></i></button>
- <button class="fab fab--material fab--mini" disabled><i class="zmdi zmdi-plus"></i></button>
- */
-
- /* stylelint-disable */
- ons-fab, ons-speed-dial-item, button {
- &.fab--mini {
- width: var(--fab-mini-width);
- height: var(--fab-mini-height);
- line-height: var(--fab-mini-height);
- }
-
- &.fab--mini__icon {
- line-height: var(--fab-mini-height);
- }
-
- &.speed-dial__item {
- position: absolute;
- transform: scale(0);
- }
- }
- /* stylelint-enable */
-
- /* stylelint-disable */
- ons-fab, button, .speed-dial {
- &.fab--top__right {
- top: 20px;
- bottom: auto;
- right: 20px;
- left: auto;
- position: var(--fab-position);
- }
-
- &.fab--bottom__right {
- top: auto;
- bottom: 20px;
- right: 20px;
- left: auto;
- position: var(--fab-position);
- }
-
- &.fab--top__left {
- top: 20px;
- bottom: auto;
- right: auto;
- left: 20px;
- position: var(--fab-position);
- }
-
- &.fab--bottom__left {
- top: auto;
- bottom: 20px;
- right: auto;
- left: 20px;
- position: var(--fab-position);
- }
-
- &.fab--top__center {
- top: 20px;
- bottom: auto;
- margin-left: -28px;
- left: 50%;
- right: auto;
- position: var(--fab-position);
- }
-
- &.fab--bottom__center {
- top: auto;
- bottom: 20px;
- margin-left: -28px;
- left: 50%;
- right: auto;
- position: var(--fab-position);
- }
- }
- /* stylelint-enable */
|