UNPKG

2.93 kBSCSSView Raw
1//
2// Copyright IBM Corp. 2016, 2018
3//
4// This source code is licensed under the Apache-2.0 license found in the
5// LICENSE file in the root directory of this source tree.
6//
7
8$css--helpers: true;
9
10@import '../../globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
11@import '../../globals/scss/typography';
12@import '../../globals/scss/vars';
13@import '../../globals/scss/helper-mixins';
14@import '../../globals/scss/css--helpers';
15@import '../button/button';
16@import '../checkbox/checkbox';
17@import '../radio-button/radio-button';
18@import '../form/form';
19@import '../overflow-menu/overflow-menu';
20@import '../search/search';
21
22/// Toolbar styles
23/// @access private
24/// @group toolbar
25@mixin toolbar {
26 .#{$prefix}--toolbar {
27 display: flex;
28 flex-flow: row nowrap;
29 align-items: center;
30 margin: 1rem 0;
31
32 > div {
33 margin: 0 rem(4px);
34 }
35
36 .#{$prefix}--search-input {
37 height: rem(32px);
38 background-color: transparent;
39 outline: none;
40 }
41
42 .#{$prefix}--search-close {
43 display: none;
44 }
45
46 .#{$prefix}--overflow-menu__icon {
47 transition: fill 50ms $carbon--standard-easing;
48 fill: $text-02;
49 }
50
51 .#{$prefix}--search-magnifier {
52 top: rem(8px);
53 left: rem(6px);
54 transform: scale(1.15);
55 cursor: pointer;
56 transition: all 175ms $carbon--standard-easing;
57 fill: $text-02;
58 }
59
60 fieldset {
61 padding: 0;
62 border: 0;
63 }
64
65 .#{$prefix}--toolbar-search--active {
66 width: rem(250px);
67
68 .#{$prefix}--search-magnifier {
69 top: rem(9px);
70 transform: scale(1);
71 }
72
73 .#{$prefix}--search-input {
74 background-color: $field-02;
75 }
76
77 .#{$prefix}--search-close {
78 display: block;
79 }
80 }
81
82 .#{$prefix}--checkbox-label {
83 margin-bottom: 0;
84 }
85
86 .#{$prefix}--overflow-menu--open > .#{$prefix}--overflow-menu__icon {
87 fill: $brand-01;
88 }
89 }
90
91 .#{$prefix}--toolbar-search {
92 width: 1.8rem;
93 transition: all 175ms $carbon--standard-easing;
94 }
95
96 .#{$prefix}--toolbar-search__btn {
97 position: absolute;
98 top: 0;
99 left: 0;
100 width: rem(32px);
101 height: rem(32px);
102 background: transparent;
103 border: 0;
104
105 &:focus {
106 @include focus-outline;
107 }
108 }
109
110 .#{$prefix}--toolbar-filter-icon {
111 padding-right: 0;
112 padding-left: 0;
113 }
114
115 .#{$prefix}--toolbar-menu__title {
116 @include type-style('caption-01');
117
118 padding: 0.5rem 1.25rem;
119 font-weight: 600;
120 }
121
122 .#{$prefix}--toolbar-menu__option {
123 padding: 0.5rem 1.25rem;
124 }
125
126 .#{$prefix}--toolbar-menu__divider {
127 width: 100%;
128 border: 0;
129 border-top: 1px solid $ui-03;
130 }
131
132 .#{$prefix}--radio-button-group {
133 border: none;
134 }
135
136 .#{$prefix}--toolbar-search:not(.#{$prefix}--toolbar-search--active)
137 .#{$prefix}--search-input {
138 border-bottom: none;
139 }
140}
141
142@include exports('toolbar') {
143 @include toolbar;
144}