forked from material-components/material-components-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshape.scss
94 lines (77 loc) · 2.45 KB
/
shape.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//
// Copyright 2018 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
@import "./common";
@import "../packages/mdc-button/mdc-button";
@import "../packages/mdc-button/mixins";
@import "../packages/mdc-button/variables";
@import "../packages/mdc-card/mdc-card";
@import "../packages/mdc-card/variables";
@import "../packages/mdc-shape/mdc-shape";
@import "../packages/mdc-shape/mixins";
.demo-wrapper {
margin: 24px;
}
// Demo buttons
// (TODO: padding, possibly through new button mixins)
.two-corner-container {
@include mdc-shape-angled-corner($mdc-theme-background, $mdc-button-height / 4, 0);
}
.four-corner-container {
margin: 0 8px;
@include mdc-shape-angled-corner($mdc-theme-background, $mdc-button-height / 4 + 1);
}
.two-corner-container--outlined,
.four-corner-container--outlined {
@include mdc-shape-angled-corner-outline(2px, $mdc-theme-primary);
}
.hero {
// Override background mask color for buttons in hero section
@include mdc-shape-angled-corner-background($hero-background-color);
// For whatever reason, this aligns the shape borders better in Chrome on OS X,
// as opposed to having the buttons centered side by side. Other browsers don't seem to have an issue.
flex-direction: column;
.four-corner-container {
margin: 8px 0;
}
}
// Demo card
.card-container {
@include mdc-shape-angled-corner($mdc-theme-background, 24px, 4px);
@include mdc-shape-angled-corner-outline($mdc-card-outline-width, $mdc-card-outline-color);
}
.demo-card {
@include mdc-card-corner-radius(24px 4px);
@include mdc-rtl {
@include mdc-card-corner-radius(4px 24px);
}
}
.demo-card__row {
display: flex;
}
.demo-card__media {
background-image: url("/images/1-1.jpg");
width: 110px;
border-top-left-radius: inherit;
@include mdc-rtl {
border-top-left-radius: 0;
border-top-right-radius: inherit;
}
}
.demo-card__info {
display: flex;
flex-direction: column;
padding: 8px 16px;
}