]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/styles.css
LP1889113 Staff catalog record holds sticky org select
[Evergreen.git] / Open-ILS / src / eg2 / src / styles.css
1 /* You can add global styles to this file, and also import other style files */
2
3 /* bootstrap CSS only -- JS bits come from ng-bootstrap */
4 @import '~bootstrap-css-only/css/bootstrap.min.css';
5
6 /* Locally served material icon fonts  */
7 @import '~material-design-icons/iconfont/material-icons.css'; 
8
9 /** BS default fonts are huge */
10 body, .form-control, .btn, .input-group-text {
11   /* This more or less matches the font size of the angularjs client.
12    * The default BS4 font of 1rem is comically large.
13    */
14   font-size: .88rem;
15 }
16 h2 {
17   font-size: 1.25rem;
18   font-weight: 550;
19   color: #129a78; /* official color of the Evergreen logo */
20   text-decoration: underline #129a78;
21 }
22 h2.card-header {
23   text-decoration: none;
24 }
25 h3 {font-size: 1.15rem}
26 h4 {font-size: 1.05rem}
27 h5 {font-size: .95rem}
28
29 .small-text-1 {font-size: 85%}
30
31
32 /** Ang5 routes on clicks to href's with no values, so we can't have
33  * bare href's to force anchor styling.  Use this for anchors w/ no href.
34  * TODO: should we style all of them?  a:not([href]) ....
35  * */
36 .no-href {
37   cursor: pointer;
38   color: #007bff;
39 }
40
41
42 /** BS has flex utility classes, but none for specifying flex widths.
43  *  BS class="col" is roughly equivelent to flex-1, but col-2 is not
44  *  equivalent to flex-2, since col-2 really means 2/12 width. */
45 .flex-1 {flex: 1}
46 .flex-2 {flex: 2}
47 .flex-3 {flex: 3}
48 .flex-4 {flex: 4}
49 .flex-5 {flex: 5}
50
51 /** BS deprecated the well, but it's replacement is not quite the same.
52  * Define our own version and expand it to a full "table".
53  * */
54 .well-row {
55   display: flex;
56 }
57 .well-table .well-label {
58   flex: 1;
59   display: flex;
60   align-items: center;
61   margin: 4px;
62   padding: 4px;
63   min-height: 40px;
64 }
65
66 .well-table .well-value {
67   flex: 1;
68   display: flex;
69   align-items: center;
70   background-color: #f5f5f5;
71   border-radius: 5px;
72   box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
73   padding: 4px;
74   margin: 4px;
75   min-height: 40px;
76 }
77
78
79 /* usefuf for mat-icon buttons without any background or borders */
80 .material-icon-button {
81   /* Transparent background */
82   border: none;
83   background-color: rgba(0, 0, 0, 0.0);
84   padding-left: .25rem;
85   padding-right: .25rem; /* default .5rem */
86 }
87
88 .mat-icon-in-button {
89     line-height: inherit;
90 }
91
92 .mat-icon-shrunk-in-button {
93     line-height: inherit;
94     font-size: 18px;
95 }
96
97 .input-group .mat-icon-in-button {
98     font-size: .88rem !important; /* useful for buttons that cuddle up with inputs */
99 }
100
101 .material-icons {
102   /** default is 24px which is pretty chunky */
103   font-size: 22px;
104 }
105
106 /* allow spans/labels to vertically orient with material icons */
107 .label-with-material-icon {
108     display: inline-flex;
109     vertical-align: middle;
110     align-items: center;
111 }
112
113 /* dropdown menu link/button with no downward carrot icon */
114 .no-dropdown-caret::after {
115     display: none;
116 }
117
118 /* Default .card padding is extreme */
119 .tight-card .card-body,
120 .tight-card .list-group-item {
121   padding: .25rem;
122 }
123 .tight-card .card-header {
124   padding: .5rem;
125 }
126
127 @media all and (min-width: 800px) {
128     /* scrollable typeahead menus for full-size screens */
129     ngb-typeahead-window {
130         height: auto;
131         max-height: 200px;
132         overflow-x: hidden;
133     }
134 }
135
136 /* Limit size of dropdown menus and allow for scrolling */
137 .scrollable-menu {
138   height: auto;
139   max-height: 300px;
140   overflow-y: auto;
141   font-size: 99%;
142 }
143
144 /* --------------------------------------------------------------------------
145 /* Form Validation CSS - https://angular.io/guide/form-validation
146  * TODO: these colors don't fit the EG color scheme
147  * Required valid fields are left-border styled in green-ish.
148  * Invalid fields are left-border styled in red-ish.
149  */
150 .form-validated .ng-valid[required], .form-validated .ng-valid.required, input[formcontrolname].ng-valid {
151   border-left: 5px solid #78FA89;
152 }
153 .form-validated .ng-invalid:not(form), input[formcontrolname].ng-invalid {
154   border-left: 5px solid #FA787E;
155 }
156
157 /* Typical form CSS.
158  * Brings font size down 5% to squeeze a bit more in.
159  * Bold labels
160  * Fixes some bootstrap margin funkiness with checkboxes for
161  * better vertical alignment.
162  * Optional faint odd or even row striping.
163  */
164 .common-form {
165   font-size: 95%;
166 }
167 .common-form .row {
168   margin: 5px;
169   padding: 3px;
170 }
171
172 .common-form label {
173   font-weight: bold;
174 }
175
176 .common-form.striped-even .row:nth-child(even) {
177   background-color: rgba(0,0,0,.03);
178   border-top: 1px solid rgba(0,0,0,.125);
179   border-bottom: 1px solid rgba(0,0,0,.125);
180 }
181 .common-form.striped-odd .row:nth-child(odd) {
182   background-color: rgba(0,0,0,.03);
183   border-top: 1px solid rgba(0,0,0,.125);
184   border-bottom: 1px solid rgba(0,0,0,.125);
185 }
186
187
188 /**
189  * Only display the print container when printing
190  */
191 #eg-print-container {
192     display: none;
193 }
194 @media print {
195   head {display: none} /* just to be safe */
196   body div:not([id="eg-print-container"]) {display: none}
197   div {display: none}
198   #eg-print-container {display: block}
199   #eg-print-container div {display: block}
200   #eg-print-container pre {border: none}
201 }
202
203 /**
204  * Make sure that comboboxes (including org select
205  * are visible, even in nested modals.
206  *
207  * See https://github.com/ng-bootstrap/ng-bootstrap/issues/2505
208  * for the upstream issue that necessitates this.
209  */
210 body>.dropdown-menu {z-index: 2100;}
211
212 /* Styles for eg-daterange-select that don't work
213  * in the component's CSS file.
214  */
215 .ngb-dp-day:not(.disabled) .daterange-day.focused {
216   background-color: #e6e6e6;
217 }
218 .ngb-dp-day:not(.disabled) .daterange-day.range, .ngb-dp-day:not(.disabled) .daterange-day:hover {
219   background-color: #129a78;
220   color: white;
221   font-size: 1.4em;
222 }
223 .ngb-dp-day:not(.disabled) .daterange-day.faded {
224   background-color: #c9efe4;
225   color: black;
226 }
227
228 /* Allow for larger XL dialogs */
229 @media (min-width: 1300px) { .modal-xl { max-width: 1200px; } }
230 @media (min-width: 1600px) { .modal-xl { max-width: 1500px; } }
231 @media (min-width: 1700px) { .modal-xl { max-width: 1600px; } }
232