Skip to content

Commit e101252

Browse files
committed
refactor: use css BEM-selectors
1 parent 42310be commit e101252

File tree

8 files changed

+93
-73
lines changed

8 files changed

+93
-73
lines changed

.ToDo

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ mpgp.github.io:
22
https://github.com/mpgp/mpgp.github.io/projects/1
33

44
In Progress:
5-
6-
@high @refactoring
7-
☐ refactor: use css BEM-selectors @created(18-06-12 21:35:58)
5+
6+
@low @refactoring
7+
☐ refactor(docs): split chapters by mat-card in docs-root.component.html @created(18-06-12 20:44:45)
8+
9+
@low @refactoring
10+
☐ refactor(spec): decomposite spec-root to small components @created(18-06-12 20:44:43)
811

912
@low
1013
☐ read the angular guides https://angular.io/guide/security @created(18-06-12 21:41:03)
@@ -14,12 +17,6 @@ mpgp.github.io:
1417

1518
To Do:
1619

17-
@low @refactoring
18-
☐ refactor(docs): split chapters by mat-card in docs-root.component.html @created(18-06-12 20:44:45)
19-
20-
@low @refactoring
21-
☐ refactor(spec): decomposite spec-root to small components @created(18-06-12 20:44:43)
22-
2320
@high @feature
2421
☐ feat(editor): add json editor for HUMAN @created(18-06-12 20:51:30)
2522
https://pp.userapi.com/c847122/v847122522/4b395/Fw0nCxQ4Yv4.jpg

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ This project was generated with [Angular CLI](https://github.com/angular/angular
2121

2222
## Development server
2323

24-
Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
24+
Run `yarn run start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
2525

2626
## Code scaffolding
2727

2828
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
2929

3030
## Build
3131

32-
Run `npm run build` to build the project. The build artifacts will be stored in the `dist` directory.
32+
Run `yarn run build` to build the project. The build artifacts will be stored in the `dist` directory.
3333

3434
## Further help
3535

src/app/components/app-sidenav/app-sidenav.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<mat-toolbar color="primary">Menu</mat-toolbar>
2-
<mat-nav-list>
2+
<mat-nav-list class="nav-list">
33
<a mat-list-item routerLink="/docs" routerLinkActive="active">Docs</a>
44
<a mat-list-item routerLink="/spec" routerLinkActive="active" class="cursive">Spec</a>
55
<mat-divider></mat-divider>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
app-sidenav {
1+
.nav-list {
22
.mat-list-item {
33
&.active {
44
background: #eee;
55
}
6-
}
7-
.cursive {
8-
font-family: cursive;
6+
&.cursive {
7+
font-family: cursive;
8+
}
99
}
1010
}

src/app/features/docs/containers/docs-root/docs-root.component.html

Lines changed: 60 additions & 34 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
docs-root {
2-
.mat-nav-list {
1+
.docs {
2+
&-list {
3+
.docs-list {
4+
margin-left: 15px;
5+
}
6+
37
.mat-list-item {
48
height: 30px;
59
}
6-
.mat-nav-list {
7-
margin-left: 15px;
8-
}
910
}
10-
.mat-card {
11+
12+
&-card {
1113
font-family: sans-serif;
12-
h2 a {
13-
color: black;
14-
}
15-
.mat-card-subtitle a {
16-
color: rgba(0,0,0,.54);
17-
}
14+
}
15+
16+
&-subtitle {
17+
color: rgba(0,0,0,.54);
18+
}
19+
20+
&-nav-link {
21+
color: black;
1822
}
1923
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
spec-chip {
2-
.mat-chip {
3-
width: 65px;
4-
justify-content: center;
5-
margin-right: 15px !important;
6-
}
2+
width: 65px;
3+
justify-content: center;
4+
margin-right: 15px !important;
75
}

src/styles.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
/* You can add global styles to this file, and also import other style files */
2-
html, body {margin:0;padding:0}
3-
app-root {
4-
.mat-card:not([class*=mat-elevation-z]) {
5-
box-shadow: inset 0 3px 1px -2px rgba(0,0,0,.2), inset 0 2px 2px 0 rgba(0,0,0,.14), inset 0 1px 5px 0 rgba(0,0,0,.12);
6-
}
7-
}
2+
html, body {margin:0;padding:0}

0 commit comments

Comments
 (0)