Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit bf4bd05

Browse files
committed
media helpers
1 parent 5bc28e2 commit bf4bd05

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

src/app/operators/components/operator/operator.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
</app-operator-header>
77
<section class="main-operator-container mat-typography">
88
<h3 class="short-description" [innerHTML]="shortDescription"></h3>
9-
<img class="marble-diagram mat-elevation-z2" [src]="marbleUrl" *ngIf="marbleUrl"/>
9+
<div class="marble-wrapper mat-elevation-z2">
10+
<img class="marble-diagram" [src]="marbleUrl" *ngIf="marbleUrl"/>
11+
</div>
1012
<h2 class="examples-header"> Examples </h2>
1113
<div
1214
class="code-example"

src/app/operators/components/operator/operator.component.scss

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
@import '../../../../styles/media-helpers';
2+
13
.main-operator-container {
24
padding: 5px;
3-
// height: 1000px;
45
display: flex;
56
flex-direction: column;
67
padding: 0 16px;
@@ -31,6 +32,15 @@
3132
margin: 32px 0 16px;
3233
}
3334

35+
.marble-wrapper {
36+
background-color: white;
37+
text-align: center;
38+
}
39+
3440
.marble-diagram {
35-
max-width: 100%;
41+
max-width: 640px;
42+
43+
@media #{$mat-sm-down} {
44+
max-width: 100%;
45+
}
3646
}

src/styles/_media-helpers.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$mat-xs: 'screen and (max-width: 599px)';
2+
$mat-sm: 'screen and (min-width: 600px) and (max-width: 959px)';
3+
$mat-sm-down: 'screen and (max-width: 960px)';
4+
$mat-mat-up: 'screen and (min-width: 961px)';
5+
$mat-md: 'screen and (min-width: 960px) and (max-width: 1279px)';
6+
$mat-mat-down: 'screen and (max-width: 1279px)';
7+
$mat-lg: 'screen and (min-width: 1280px) and (max-width: 1919px)';
8+
$mat-xl: 'screen and (min-width: 1920px) and (max-width: 5000px)';

0 commit comments

Comments
 (0)