File tree Expand file tree Collapse file tree 3 files changed +39
-21
lines changed
app/features/code-examples Expand file tree Collapse file tree 3 files changed +39
-21
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " cardholder-pwa" ,
3- "version" : " 0.0.11 " ,
3+ "version" : " 0.0.12 " ,
44 "scripts" : {
55 "ng" : " ng" ,
66 "start" : " ng serve --port=4207 --open" ,
Original file line number Diff line number Diff line change 1+ @use ' mixins' as mx ;
2+
13:host {
24 .code-examples {
3- width : 100% ;
4- height : auto ;
5- max-height : 100% ;
6- display : flex ;
7- flex-direction : row ;
8- align-items : stretch ;
9- justify-content : flex-start ;
10- flex-wrap : wrap ;
11- overflow : hidden ;
12- gap : 16px ;
13-
14- & > * {
15- width : 100% ;
16- }
17-
18- @media (width > 400px ) {
19- & > * {
20- width : calc (50% - 8px );
21- }
22- }
5+ @include mx .flex-container (6 );
236
247 .code-examples-item {
258 margin : 0 ;
Original file line number Diff line number Diff line change 1515 width : 100% ;
1616 max-width : 600px ;
1717}
18+ // Mixin for password hints list
1819@mixin form-password-hints {
1920 padding-left : 20px ;
2021 margin : unset ;
2122 width : 100% ;
2223 padding-bottom : 20px ;
2324}
25+ // Mixin for main components e.g. cards, user
26+ // presented in main router-outlet.
2427@mixin component-host {
2528 display : block ;
2629 padding : 16px 16px 40px 16px ;
2932 max-height : 100% ;
3033 position : relative ;
3134}
35+ // Mixin ofr tables in admin component
3236@mixin mat-table {
3337 table {
3438 width : 100% ;
4347 }
4448 }
4549}
50+ // Mixin for buttons in mat-dialog
4651@mixin mat-dialog-actions {
4752 margin-top : auto ;
4853 gap : 8px ;
4954}
55+ // Mixin for flexible containers e.g. forms, card, code-examples.
56+ @mixin flex-container ($maxCols : 4 ) {
57+ width : 100% ;
58+ height : auto ;
59+ max-height : 100% ;
60+ display : flex ;
61+ flex-direction : row ;
62+ align-items : stretch ;
63+ justify-content : flex-start ;
64+ flex-wrap : wrap ;
65+ overflow : hidden ;
66+
67+ $gap : 16px ;
68+ gap : $gap ;
69+
70+ & > * {
71+ width : 100% ;
72+ }
73+
74+ @for $i from 1 through $maxCols - 1 {
75+ $cols : $i + 1 ;
76+ $breakpoint : 400px + 300px * $i ;
77+
78+ @media (width > $breakpoint ) {
79+ & > * {
80+ width : calc (100% / #{$cols } - $gap * $i / $cols );
81+ }
82+ }
83+ }
84+ }
You can’t perform that action at this time.
0 commit comments