]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/styles.css
LP1910145 Angular Hold Detail Notes & Notifications
[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-label-no-flex {
67   display: flex;
68   align-items: center;
69   margin: 4px;
70   padding: 4px;
71   min-height: 40px;
72 }
73
74 .well-table .well-value {
75   flex: 1;
76   display: flex;
77   align-items: center;
78   background-color: #f5f5f5;
79   border-radius: 5px;
80   box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
81   padding: 4px;
82   margin: 4px;
83   min-height: 40px;
84 }
85
86
87 /* usefuf for mat-icon buttons without any background or borders */
88 .material-icon-button {
89   /* Transparent background */
90   border: none;
91   background-color: rgba(0, 0, 0, 0.0);
92   padding-left: .25rem;
93   padding-right: .25rem; /* default .5rem */
94 }
95
96 .mat-icon-in-button {
97     line-height: inherit;
98 }
99
100 .mat-icon-shrunk-in-button {
101     line-height: inherit;
102     font-size: 18px;
103 }
104
105 .input-group .mat-icon-in-button {
106     font-size: .88rem !important; /* useful for buttons that cuddle up with inputs */
107 }
108
109 .material-icons {
110   /** default is 24px which is pretty chunky */
111   font-size: 22px;
112 }
113
114 /* allow spans/labels to vertically orient with material icons */
115 .label-with-material-icon {
116     display: inline-flex;
117     vertical-align: middle;
118     align-items: center;
119 }
120
121 /* dropdown menu link/button with no downward carrot icon */
122 .no-dropdown-caret::after {
123     display: none;
124 }
125
126 /* Default .card padding is extreme */
127 .tight-card .card-body,
128 .tight-card .list-group-item {
129   padding: .25rem;
130 }
131 .tight-card .card-header {
132   padding: .5rem;
133 }
134
135 @media all and (min-width: 800px) {
136     /* scrollable typeahead menus for full-size screens */
137     ngb-typeahead-window {
138         height: auto;
139         max-height: 200px;
140         overflow-x: hidden;
141     }
142 }
143
144 /* Limit size of dropdown menus and allow for scrolling */
145 .scrollable-menu {
146   height: auto;
147   max-height: 300px;
148   overflow-y: auto;
149   font-size: 99%;
150 }
151
152 /* --------------------------------------------------------------------------
153 /* Form Validation CSS - https://angular.io/guide/form-validation
154  * TODO: these colors don't fit the EG color scheme
155  * Required valid fields are left-border styled in green-ish.
156  * Invalid fields are left-border styled in red-ish.
157  */
158 .form-validated .ng-valid[required], .form-validated .ng-valid.required, input[formcontrolname].ng-valid {
159   border-left: 5px solid #78FA89;
160 }
161 .form-validated .ng-invalid:not(form), input[formcontrolname].ng-invalid {
162   border-left: 5px solid #FA787E;
163 }
164
165 /* Typical form CSS.
166  * Brings font size down 5% to squeeze a bit more in.
167  * Bold labels
168  * Fixes some bootstrap margin funkiness with checkboxes for
169  * better vertical alignment.
170  * Optional faint odd or even row striping.
171  */
172 .common-form {
173   font-size: 95%;
174 }
175 .common-form .row {
176   margin: 5px;
177   padding: 3px;
178 }
179
180 .common-form label {
181   font-weight: bold;
182 }
183
184 .common-form.striped-even .row:nth-child(even) {
185   background-color: rgba(0,0,0,.03);
186   border-top: 1px solid rgba(0,0,0,.125);
187   border-bottom: 1px solid rgba(0,0,0,.125);
188 }
189 .common-form.striped-odd .row:nth-child(odd) {
190   background-color: rgba(0,0,0,.03);
191   border-top: 1px solid rgba(0,0,0,.125);
192   border-bottom: 1px solid rgba(0,0,0,.125);
193 }
194
195
196 /**
197  * Only display the print container when printing
198  */
199 #eg-print-container {
200     display: none;
201 }
202 @media print {
203   head {display: none} /* just to be safe */
204   body div:not([id="eg-print-container"]) {display: none}
205   div {display: none}
206   #eg-print-container {display: block}
207   #eg-print-container div {display: block}
208   #eg-print-container pre {border: none}
209 }
210
211 /**
212  * Make sure that comboboxes (including org select
213  * are visible, even in nested modals.
214  *
215  * See https://github.com/ng-bootstrap/ng-bootstrap/issues/2505
216  * for the upstream issue that necessitates this.
217  */
218 body>.dropdown-menu {z-index: 2100;}
219
220 /* Styles for eg-daterange-select that don't work
221  * in the component's CSS file.
222  */
223 .ngb-dp-day:not(.disabled) .daterange-day.focused {
224   background-color: #e6e6e6;
225 }
226 .ngb-dp-day:not(.disabled) .daterange-day.range, .ngb-dp-day:not(.disabled) .daterange-day:hover {
227   background-color: #129a78;
228   color: white;
229   font-size: 1.4em;
230 }
231 .ngb-dp-day:not(.disabled) .daterange-day.faded {
232   background-color: #c9efe4;
233   color: black;
234 }
235
236 /* Allow for larger XL dialogs */
237 @media (min-width: 1300px) { .modal-xl { max-width: 1200px; } }
238 @media (min-width: 1600px) { .modal-xl { max-width: 1500px; } }
239 @media (min-width: 1700px) { .modal-xl { max-width: 1600px; } }
240
241 /**
242  * Make the acquisitions search form's navigation tabs match
243  * those of the staff interface. This is a global rule because
244  * various approaches to doing it local to the acq search component
245  * don't work:
246  *
247  * 1. A rule bound to the container of the acq search tabset
248  *    would make the entire background be grey.
249  * 2. ":host ::ng-deep" for a local rule works, but depends on a
250  *    mechanism that is deprecated.
251  * 4. ng-tabset provides no hooks for custom styles for the nav-tab
252  *    background.
253  * 5. Turning off view encapsulation for the acq search component
254  *    breaks a lot of styles.
255  */
256 #acq-search-page ngb-tabset .nav.nav-tabs {
257   background-color: rgb(247, 247, 247);
258 }