Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit bbe0d68

Browse files
authored
Add Sass files for reference (#118)
1 parent 4ffdf09 commit bbe0d68

File tree

78 files changed

+4973
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4973
-1
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.5.3+1
2+
3+
* Add SASS files.
4+
5+
> NOTE: SASS files are not used during the build step of this package and are
6+
> provided as reference only. These .scss files were used to generate the
7+
> corresponding .css files in a separate process. We are working on a solution
8+
> to include CSS generation from SASS files during the build process.
9+
110
## 0.5.3
211

312
* Add Material Tree component.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3+
* for details. All rights reserved. Use of this source code is governed by a
4+
* BSD-style license that can be found in the LICENSE file.
5+
*/
6+
7+
/*
8+
* NOTE: SASS files are not used during the build step of this package and are
9+
* provided as reference only. These .scss files were used to generate the
10+
* corresponding .css files in a separate process. We are working on a solution
11+
* to include CSS generation from SASS files during the build process.
12+
*/
13+
14+
@mixin disabled-cursor($cursor-style) {
15+
/deep/ [buttonDecorator].is-disabled {
16+
cursor: $cursor-style;
17+
}
18+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3+
* for details. All rights reserved. Use of this source code is governed by a
4+
* BSD-style license that can be found in the LICENSE file.
5+
*/
6+
7+
/*
8+
* NOTE: SASS files are not used during the build step of this package and are
9+
* provided as reference only. These .scss files were used to generate the
10+
* corresponding .css files in a separate process. We are working on a solution
11+
* to include CSS generation from SASS files during the build process.
12+
*/
13+
14+
/// Consider using button-base or material-button instead from:
15+
/// lib/src/components/material_button/_mixins.scss
16+
/// These mixins provide more of the typical values used in buttons.
17+
///
18+
19+
/// Default styles that should be provided for all elements that use
20+
/// the buttonDecorator directive.
21+
[buttonDecorator] {
22+
cursor: pointer;
23+
24+
&.is-disabled {
25+
cursor: not-allowed;
26+
}
27+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3+
* for details. All rights reserved. Use of this source code is governed by a
4+
* BSD-style license that can be found in the LICENSE file.
5+
*/
6+
7+
/*
8+
* NOTE: SASS files are not used during the build step of this package and are
9+
* provided as reference only. These .scss files were used to generate the
10+
* corresponding .css files in a separate process. We are working on a solution
11+
* to include CSS generation from SASS files during the build process.
12+
*/
13+
14+
:host {
15+
display: block
16+
}
17+
18+
// These styles allow the contents within the focus-trap component to inherit
19+
// the height and max-height of the focus-trap component if the height and
20+
// max-height are set like so:
21+
//
22+
// focus-trap {
23+
// height: 100px;
24+
// max-height: 100px;
25+
// }
26+
//
27+
// These styles are needed by the material-dialog component, which uses the focus-trap component.
28+
[focusContentWrapper] {
29+
height: inherit;
30+
max-height: inherit;
31+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3+
* for details. All rights reserved. Use of this source code is governed by a
4+
* BSD-style license that can be found in the LICENSE file.
5+
*/
6+
7+
/*
8+
* NOTE: SASS files are not used during the build step of this package and are
9+
* provided as reference only. These .scss files were used to generate the
10+
* corresponding .css files in a separate process. We are working on a solution
11+
* to include CSS generation from SASS files during the build process.
12+
*/
13+
14+
/// Change the size of a glyph icon.
15+
///
16+
/// Only use this mixin if your UI calls for an icon size which is not one of
17+
/// the presets: {12px, 13px, 16px, 20px, and 24px).
18+
///
19+
/// The font-icon CSS has a default font size of 24px, therefore, one must
20+
/// be more specific to override the default.
21+
/// Note: The should be scoped to a shimmed selector outside.
22+
@mixin glyph-size($size) {
23+
/deep/ i {
24+
font-size: $size;
25+
height: 1em;
26+
line-height: 1em;
27+
width: 1em;
28+
}
29+
}
30+
31+
/// Change the size of a font-icon.
32+
///
33+
/// Only use this mixin if your UI calls for an icon size which is not one of
34+
/// the presets: {12px, 13px, 16px, 20px, and 24px).
35+
///
36+
/// The font-icon CSS has a default font size of 24px, therefore, one must
37+
/// be more specific to override the default.
38+
/// Please use a very specific selector to avoid collisions ex:
39+
/// @include glyph-icon-size('material-chip > .delete-icon', 10px);
40+
/// Note: The selector must select to the `glyph` element.
41+
/// @Deprecated. Use glyph-size mixin instead.
42+
@mixin glyph-icon-size($selector, $value) {
43+
/deep/ #{$selector} i {
44+
font-size: $value;
45+
height: 1em;
46+
line-height: 1em;
47+
width: 1em;
48+
}
49+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3+
* for details. All rights reserved. Use of this source code is governed by a
4+
* BSD-style license that can be found in the LICENSE file.
5+
*/
6+
7+
/*
8+
* NOTE: SASS files are not used during the build step of this package and are
9+
* provided as reference only. These .scss files were used to generate the
10+
* corresponding .css files in a separate process. We are working on a solution
11+
* to include CSS generation from SASS files during the build process.
12+
*/
13+
14+
@import 'lib/src/css/material/material';
15+
@import 'compass/css3/flexbox';
16+
@import 'mixins';
17+
18+
$x-small: $mat-grid-type * 3; // 12px
19+
$small: $mat-body-font-size; // 13px
20+
$medium: $mat-grid-type * 4; // 16px
21+
$large: $mat-grid-type * 4.5; // 18px
22+
$x-large: $mat-grid-type * 5; // 20px
23+
24+
:host {
25+
display: inline-flex;
26+
27+
&[light] {
28+
opacity: $mat-icon-opacity;
29+
}
30+
31+
&[size="x-small"] {
32+
@include glyph-size($x-small);
33+
}
34+
35+
&[size="small"] {
36+
@include glyph-size($small);
37+
}
38+
39+
&[size="medium"] {
40+
@include glyph-size($medium);
41+
}
42+
43+
&[size="large"] {
44+
@include glyph-size($large);
45+
}
46+
47+
&[size="x-large"] {
48+
@include glyph-size($x-large);
49+
}
50+
}
51+
52+
:host-context([dir="rtl"])[flip] .glyph-i {
53+
transform: scaleX(-1);
54+
}
55+
56+
// Add the `baseline` attribute on the glyph element if the glyph needs to be
57+
// aligned to the baseline.
58+
//
59+
// E.g. <glyph baseline icon='add'></glyph>
60+
//
61+
// In a flex or inline layout, the baseline of this element by default is
62+
// the bottom margin since the element doesn't have any displayed text to
63+
// calculate the baseline from. Thus, the glyph is always positioned too high
64+
// relative to other baseline-positioned elements. Adding the `baseline`
65+
// attribute to the glyph HTML element will insert a shim text element that will
66+
// implicitly set the icon baseline to the slightly below the center of the
67+
// icon.
68+
//
69+
// This issue arises because the material icons extended font sets a descent
70+
// value of 0, which means the baseline is set to the bottom of the icon.
71+
:host[baseline] {
72+
align-items: center;
73+
74+
&::before {
75+
content: '-';
76+
display: inline-block;
77+
width: 0;
78+
visibility: hidden;
79+
}
80+
81+
.glyph-i {
82+
// Set a bottom margin so glyph baseline is near the expected position of a
83+
// font rather than through the middle. Use `em` to be glyph
84+
// font-size-independent.
85+
margin-bottom: .1em;
86+
}
87+
}

0 commit comments

Comments
 (0)