Skip to content

Commit 52ec93a

Browse files
committed
fix(docs): Improve demo-browser styling
1 parent 2b05494 commit 52ec93a

2 files changed

Lines changed: 31 additions & 20 deletions

File tree

projects/ngqp-demo/src/app/demo-browser/demo-browser.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="demo-browser__toolbar">
2-
<button class="demo-browser__button" title="{{ routerAdapter.history.length }} previous routes"
2+
<button class="demo-browser__button" title="{{ routerAdapter.history.length }} previous route(s)"
33
(click)="routerAdapter.goBack()" [disabled]="routerAdapter.history.length === 0">
4-
<fa-icon [icon]="faArrowLeft" size="sm"></fa-icon>
4+
<fa-icon [icon]="faArrowLeft" size="1x"></fa-icon>
55
</button>
66

77
<div class="demo-browser__url">

projects/ngqp-demo/src/app/demo-browser/demo-browser.component.scss

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
$panel-background: #f0f0f0;
2+
$panel-accent: #d1d1d1;
3+
$panel-content-height: 27px;
4+
15
:host {
26
display: block;
37
border: 1px solid #bdbdbd;
@@ -27,9 +31,10 @@
2731
&__toolbar {
2832
display: flex;
2933

30-
background: #eeeeee;
31-
border-bottom: 1px solid #e0e0e0;
32-
padding: 4px 8px;
34+
background: $panel-background;
35+
border-bottom: 1px solid $panel-accent;
36+
padding: 6px;
37+
box-shadow: -1px 1px 2px rgba(0, 0, 0, .1);
3338
}
3439

3540
&__button {
@@ -39,16 +44,21 @@
3944
&__url {
4045
flex-grow: 1;
4146

42-
font-family: monospace;
43-
height: 24px;
44-
line-height: 24px;
47+
font-family: Roboto, Droid Sans, Helvetica Neue, Arial, Helvetica, sans-serif;
48+
font-size: 14px;
49+
font-weight: 400;
50+
51+
height: $panel-content-height;
52+
line-height: $panel-content-height;
4553

4654
cursor: not-allowed;
4755
background: #fff;
48-
border-radius: 16px;
49-
padding: 0 16px;
56+
border-radius: 4px;
57+
border: 1px solid #ccc;
58+
padding: 0 8px;
5059

5160
display: flex;
61+
align-items: center;
5262

5363
&__domain {
5464
flex-grow: 0;
@@ -74,12 +84,13 @@
7484
}
7585

7686
&__console {
77-
background: #eeeeee;
78-
border-top: 1px solid #e0e0e0;
79-
padding: 4px 8px;
87+
background: $panel-background;
88+
border-top: 1px solid $panel-accent;
89+
padding: 6px;
90+
box-shadow: 1px -1px 2px rgba(0, 0, 0, .1);
8091

81-
font-size: small;
82-
color: #616161;
92+
font-size: 12px;
93+
color: #5f615f;
8394

8495
display: flex;
8596
justify-content: space-between;
@@ -90,18 +101,18 @@ button.demo-browser__button {
90101
@include btn-reset();
91102
outline: 0;
92103
cursor: pointer;
93-
margin-right: 8px;
104+
margin-right: 4px;
94105

95-
width: 24px;
96-
height: 24px;
106+
width: $panel-content-height;
107+
height: $panel-content-height;
97108
display: flex;
98109
justify-content: center;
99110
align-items: center;
100111
background: transparent;
101-
border-radius: 50%;
112+
border-radius: 4px;
102113

103114
&:not(:disabled) {
104-
&:hover {
115+
&:hover, &:focus {
105116
background: #e0e0e0;
106117
}
107118

0 commit comments

Comments
 (0)