Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 9e7c624

Browse files
committed
Extracted common styling out of the better repl gui for easier reading and better reuse.
1 parent 28e0e4b commit 9e7c624

File tree

3 files changed

+136
-65
lines changed

3 files changed

+136
-65
lines changed

src/app/layouts/common-layout/common-layout.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ import { Component } from '@angular/core';
33
@Component({
44
selector: 'app-common-layout',
55
templateUrl: './common-layout.component.html',
6+
styleUrls: ['./common.scss']
67
})
78
export class CommonLayoutComponent { }
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/* This common styles file should be used to create more readable html for our custom pages. */
2+
@import '../../../theme/styles';
3+
4+
.card {
5+
6+
&--half-size {
7+
@extend .mdl-cell, .mdl-cell--6-col-desktop, .mdl-cell--6-col-tablet, .mdl-cell--4-col-phone;
8+
}
9+
10+
&--third-size {
11+
@extend .mdl-cell, .mdl-cell--4-col-desktop, .mdl-cell--4-col-tablet, .mdl-cell--2-col-phone;
12+
}
13+
14+
&--quarter-size {
15+
@extend .mdl-cell, .mdl-cell--3-col-desktop, .mdl-cell--3-col-tablet, .mdl-cell--2-col-phone;
16+
}
17+
}
18+
19+
.card--title {
20+
@extend .mdl-card__title-text;
21+
}
22+
23+
/* USAGE: container--text mdl-js-textfield */
24+
.container {
25+
&--text {
26+
@extend .mdl-cell, .mdl-cell--6-col, .mdl-textfield, .mdl-textfield--floating-label;
27+
}
28+
}
29+
30+
.button-base {
31+
@extend .mdl-button;
32+
color: #fff !important;
33+
}
34+
35+
/* USAGE: button--red mdl-js-button mdl-js-ripple-effect */
36+
.button {
37+
38+
&--green {
39+
@extend .button-base, .mdl-button--raised, .button--colored-green;
40+
}
41+
42+
&--blue {
43+
@extend .button-base, .mdl-button--raised, .button--colored-light-blue;
44+
}
45+
46+
&--teal {
47+
@extend .button-base, .mdl-button--raised, .button--colored-teal;
48+
}
49+
50+
&--red {
51+
@extend .button-base, .mdl-button--raised, .button--colored-red;
52+
}
53+
54+
&--orange {
55+
@extend .button-base, .mdl-button--raised, .button--colored-orange;
56+
}
57+
}
58+
59+
/* USAGE: button-trans--teal mdl-js-button mdl-js-ripple-effect */
60+
.button-trans {
61+
62+
&--white {
63+
@extend .mdl-button;
64+
}
65+
66+
&--teal {
67+
@extend .mdl-button, .button--colored-teal;
68+
}
69+
70+
}

0 commit comments

Comments
 (0)