]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/styles.css
LP1819053 Angular staff catalog basket export
[working/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  * Note when I first tested these after installing the fonts
8  * via:  npm install --save material-design-icons
9  * some of the icons exhibited odd behavior, adding a lot of
10  * excess space to the left or right.  It only affected certain
11  * icons.  More research needed.
12  * /
13 /*
14 @import '~material-design-icons/iconfont/material-icons.css';
15 */
16
17 /** BS default fonts are huge */
18 body, .form-control, .btn, .input-group-text {
19   /* This more or less matches the font size of the angularjs client.
20    * The default BS4 font of 1rem is comically large.
21    */
22   font-size: .88rem;
23 }
24 h2 {font-size: 1.25rem}
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 .material-icons {
93   /** default is 24px which is pretty chunky */
94   font-size: 22px;
95 }
96
97 /* allow spans/labels to vertically orient with material icons */
98 .label-with-material-icon {
99     display: inline-flex;
100     vertical-align: middle;
101     align-items: center;
102 }
103
104 /* dropdown menu link/button with no downward carrot icon */
105 .no-dropdown-caret::after {
106     display: none;
107 }
108
109 /* Default .card padding is extreme */
110 .tight-card .card-body,
111 .tight-card .list-group-item {
112   padding: .25rem;
113 }
114 .tight-card .card-header {
115   padding: .5rem;
116 }
117
118 @media all and (min-width: 800px) {
119     /* scrollable typeahead menus for full-size screens */
120     ngb-typeahead-window {
121         height: auto;
122         max-height: 200px;
123         overflow-x: hidden;
124     }
125 }
126
127 /* Limit size of dropdown menus and allow for scrolling */
128 .scrollable-menu {
129   height: auto;
130   max-height: 300px;
131   overflow-y: auto;
132   font-size: 99%;
133 }
134
135 /* --------------------------------------------------------------------------
136 /* Form Validation CSS - https://angular.io/guide/form-validation
137  * TODO: these colors don't fit the EG color scheme
138  * Required valid fields are left-border styled in green-ish.
139  * Invalid fields are left-border styled in red-ish.
140  */
141 .form-validated .ng-valid[required], .form-validated .ng-valid.required {
142   border-left: 5px solid #78FA89;
143 }
144 .form-validated .ng-invalid:not(form) {
145   border-left: 5px solid #FA787E;
146 }
147
148 /* Typical form CSS.
149  * Brings font size down 5% to squeeze a bit more in.
150  * Bold labels
151  * Fixes some bootstrap margin funkiness with checkboxes for
152  * better vertical alignment.
153  * Optional faint odd or even row striping.
154  */
155 .common-form {
156   font-size: 95%;
157 }
158 .common-form .row {
159   margin: 5px;
160   padding: 3px;
161 }
162
163 .common-form label {
164   font-weight: bold;
165 }
166
167 .common-form.striped-even .row:nth-child(even) {
168   background-color: rgba(0,0,0,.03);
169   border-top: 1px solid rgba(0,0,0,.125);
170   border-bottom: 1px solid rgba(0,0,0,.125);
171 }
172 .common-form.striped-odd .row:nth-child(odd) {
173   background-color: rgba(0,0,0,.03);
174   border-top: 1px solid rgba(0,0,0,.125);
175   border-bottom: 1px solid rgba(0,0,0,.125);
176 }
177
178
179 /**
180  * Only display the print container when printing
181  */
182 #eg-print-container {
183     display: none;
184 }
185 @media print {
186   head {display: none} /* just to be safe */
187   body div:not([id="eg-print-container"]) {display: none}
188   div {display: none}
189   #eg-print-container {display: block}
190   #eg-print-container div {display: block}
191   #eg-print-container pre {border: none}
192 }
193