Skip to content

Commit 7a17d57

Browse files
authored
Merge pull request materializecss#605 from materializecss/fix-dropdown-in-modal
Fix dropdown in modal
2 parents fe0a6a4 + d33c842 commit 7a17d57

33 files changed

+191
-387
lines changed

sass/components/_buttons.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use './mixins.module.scss' as *;
2+
@use './variables' as *;
3+
14
:root {
25
--btn-height: 40px;
36
--btn-font-size-icon: 16px;

sass/components/_cards.scss

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use './variables' as *;
2+
@use './mixins.module.scss' as *;
3+
14
.card-panel {
25
transition: box-shadow .25s;
36
padding: 24px;
@@ -8,10 +11,11 @@
811
}
912

1013
.card {
11-
overflow: hidden;
14+
--background-color: color-mix(in srgb, var(--md-sys-color-surface), var(--md-sys-color-surface-tint) 17%);
15+
1216
position: relative;
1317
//margin: $element-top-margin 0 $element-bottom-margin 0;
14-
background-color: var(--md-sys-color-surface);
18+
background-color: var(--background-color);
1519
transition: box-shadow .25s;
1620
border-radius: 12px;
1721
@extend .z-depth-1;
@@ -172,28 +176,11 @@
172176

173177
.card-action {
174178
padding: 0 1.6rem;
175-
// position: relative;
176-
// border-top: 1px solid var(--md-sys-color-outline-variant);
177-
// background-color: inherit;
178179

179180
&:last-child {
180181
border-radius: 0 0 2px 2px;
181182
}
182183
// Replaced card links with buttons (Accessibility, @see https://github.com/materializecss/materialize/issues/565)
183-
/*a {
184-
padding: 16px 24px;
185-
display: inline-block;
186-
}
187-
188-
a:not(.btn):not(.btn-large):not(.btn-floating) {
189-
color: var(--md-sys-color-primary);
190-
transition: color .3s ease;
191-
192-
&:hover {
193-
background-color: rgba(var(--md-sys-color-primary-numeric), 0.06);
194-
}
195-
}*/
196-
197184
a {
198185
@include btn(
199186
var(--btn-height),

sass/components/_chips.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use './colors.module.scss' as *;
2+
13
.chip {
24
--font-size: 14px;
35
--font-size-icon: 18px;

sass/components/_collapsible.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@use './variables' as *;
2+
@use './colors.module.scss' as *;
3+
@use './global' as *;
4+
15
.collapsible {
26
padding-left: 0;
37
list-style-type: none;

sass/components/_collection.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Collections
1+
@use './variables' as *;
2+
23
.collection {
34
padding-left: 0;
45
list-style-type: none;
@@ -55,10 +56,8 @@
5556
top: 16px;
5657
right: 16px;
5758
}
58-
5959
}
6060

61-
6261
&:last-child {
6362
border-bottom: none;
6463
}

sass/components/_color-classes.scss

Lines changed: 0 additions & 32 deletions
This file was deleted.

sass/components/_color-variables.scss

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,9 @@ $colors: (
355355
) !default;
356356

357357

358-
// usage: color("name_of_color", "type_of_color")
358+
// usage: colorFunc("name_of_color", "type_of_color")
359359
// to avoid to repeating map-get($colors, ...)
360-
361-
@function color($color, $type) {
360+
@function colorFunc($color, $type) {
362361
@if map-has-key($colors, $color) {
363362
$curr_color: map-get($colors, $color);
364363
@if map-has-key($curr_color, $type) {
@@ -368,3 +367,36 @@ $colors: (
368367
@warn "Unknown `#{$color}` - `#{$type}` in $colors.";
369368
@return null;
370369
}
370+
371+
372+
// Color Classes
373+
@each $color_name, $color in $colors {
374+
@each $color_type, $color_value in $color {
375+
@if $color_type == "base" {
376+
.#{$color_name} {
377+
background-color: $color_value !important;
378+
}
379+
.#{$color_name}-text {
380+
color: $color_value !important;
381+
}
382+
}
383+
@else if $color_name != "shades" {
384+
.#{$color_name}.#{$color_type} {
385+
background-color: $color_value !important;
386+
}
387+
.#{$color_name}-text.text-#{$color_type} {
388+
color: $color_value !important;
389+
}
390+
}
391+
}
392+
}
393+
394+
// Shade classes
395+
@each $color, $color_value in $shades {
396+
.#{$color} {
397+
background-color: $color_value !important;
398+
}
399+
.#{$color}-text {
400+
color: $color_value !important;
401+
}
402+
}

sass/components/_datepicker.scss

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -261,29 +261,3 @@
261261
color: var(--md-sys-color-error);
262262
}
263263

264-
265-
/* Media Queries */
266-
@media #{$medium-and-up} {
267-
// @removed since v2.2.1-dev regarding Material M3 standards
268-
/*.datepicker-modal {
269-
max-width: 625px;
270-
}
271-
272-
.datepicker-container.modal-content {
273-
flex-direction: row;
274-
}
275-
276-
.datepicker-date-display {
277-
flex: 0 1 270px;
278-
}
279-
280-
.datepicker-controls,
281-
.datepicker-table,
282-
.datepicker-footer {
283-
width: 320px;
284-
}
285-
286-
.datepicker-day-button {
287-
line-height: 44px;
288-
}*/
289-
}

sass/components/_dropdown.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use './variables' as *;
2+
@use './global' as *;
3+
14
[popover] {
25
outline: none;
36
padding: 0;

sass/components/_global.scss

Lines changed: 7 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use './_variables' as *;
2+
13
html {
24
box-sizing: border-box;
35
}
@@ -19,8 +21,10 @@ textarea {
1921
font-family: $font-stack;
2022
}
2123

22-
a { color: $link-color; text-decoration: none;
23-
-webkit-tap-highlight-color: transparent; // Gets rid of tap active state
24+
a {
25+
color: $link-color;
26+
text-decoration: none;
27+
-webkit-tap-highlight-color: transparent; // Gets rid of tap active state
2428
}
2529

2630
// Positioning
@@ -129,72 +133,6 @@ video.responsive-video {
129133
height: auto;
130134
}
131135

132-
// moved to own component styling file @see https://github.com/materializecss/materialize/issues/566
133-
// Pagination
134-
/*.pagination {
135-
136-
li {
137-
display: inline-block;
138-
border-radius: 2px;
139-
text-align: center;
140-
vertical-align: top;
141-
height: 30px;
142-
143-
a {
144-
color: var(--md-sys-color-on-surface-variant);
145-
display: inline-block;
146-
font-size: 1.2rem;
147-
padding: 0 10px;
148-
line-height: 30px;
149-
}
150-
151-
&:hover:not(.disabled) {
152-
background-color: rgba(var(--md-sys-color-primary-numeric), 0.06);
153-
}
154-
155-
&.active a {
156-
color: var(--md-sys-color-on-primary);
157-
}
158-
159-
&.active,
160-
&.active:hover {
161-
background-color: var(--md-sys-color-primary);
162-
}
163-
164-
&.disabled a {
165-
cursor: default;
166-
color: var(--md-sys-color-on-surface);
167-
}
168-
169-
i {
170-
font-size: 2rem;
171-
}
172-
}
173-
174-
175-
li.pages ul li {
176-
display: inline-block;
177-
float: none;
178-
}
179-
}
180-
181-
@media #{$medium-and-down} {
182-
.pagination {
183-
width: 100%;
184-
185-
li.prev,
186-
li.next {
187-
width: 10%;
188-
}
189-
190-
li.pages {
191-
width: 80%;
192-
overflow: hidden;
193-
white-space: nowrap;
194-
}
195-
}
196-
}*/
197-
198136
// Parallax
199137
.parallax-container {
200138
position: relative;
@@ -320,6 +258,7 @@ ul.staggered-list li { opacity: 0; }
320258
padding: 10px 0px;
321259
}
322260
}
261+
323262
.page-footer ul {
324263
padding-left: 0;
325264
list-style-type: none;

0 commit comments

Comments
 (0)