source: main/trunk/model-interfaces-dev/wmtb/styles/gs-wmtb-custom.css@ 35281

Last change on this file since 35281 was 35281, checked in by anupama, 3 years ago

When the iframe height=100vh change on weebly finally got published, forgot to activate/update the .shifted-frame dimensions for screen at widths <= bp-small-max which now needs to calc new height of shifted frame with height-header-mobile. The shifted-frame scoller replacing the body scroll now works when at screenwidth of 1024px or smaller (which is wider than mobile). This change not having been active earlier today, it explains why the scroller wasn't visible at bottom full scroll earlier today when we re-tested at <= 1024px screenwidths.

File size: 8.0 KB
Line 
1/* DEFINING CSS VARIABLES - redefining them from weebly site (variables.less used in header.less)
2https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
3
4BUT UNFORTUNATELY, we can't use css variables in media query declarations:
5https://stackoverflow.com/questions/40722882/css-native-variables-not-working-in-media-queries
6*/
7:root {
8 --height-header: 120px;
9 --height-header-mobile: 93px;
10 --bp-small: 1025px;
11 --bp-small-max: 1024px; /* 1 less */
12}
13
14/* Within the page that loads in iframe, want a spacer (for now 120px high) that
15will take up the space of the whakatohea navbar. Want the scrollbar shifted from
16body element into (an) element that spatially immediately follows the vertical spacer.*/
17body#top {
18 overflow-y: hidden;
19 margin: 0;
20 border: none;
21}
22
23div#spacer-for-nav
24{
25 height: var(--height-header); /*120px;*/
26 width: auto;
27} /* margin-top:120px; Why did height not have any effect? Because of self-closing div. Need explicit closing div. But an empty opening + closing div is dangerous in GS3, try using gsf:div element (not sure if class attribute will work on it) if xml equivalent of nbsp entity inside empty op+closing div doesn't work.*/
28
29
30/* https://www.w3schools.com/cssref/css_units.asp
31 https://css-tricks.com/a-complete-guide-to-calc-in-css/
32 Need spaces around (arithmetic) operator in calc() equations
33*/
34.shifted-frame {
35 overflow: auto;
36 height: calc(100vh - var(--height-header)); /*calc(100vh - 120px);*/
37 width: auto;
38
39} /* Why does height calc(100% -120px) instead of using 100vh not work? */
40
41
42/* Mobile settings
43Hardcoded values copied from weebly site theme's variables.less file called in header.less */
44@media screen and (max-width: 1024px) { /* bp-small-max */
45
46 /*
47 body { overflow: auto; }
48 */
49
50 div#spacer-for-nav {
51 height: var(--height-header-mobile); /*93px;*/
52 }
53
54 .shifted-frame {
55 height: calc(100vh - var(--height-header-mobile));
56 /*height: 100vh;*/ /*calc(100vh - 93px);*/
57 /*overflow-y: auto;*//* scroll;*/
58 }
59
60 /* Maybe undo any changes made below for full-screen version so mobile unaffected*/
61 /*
62 div.crop-bg {
63 height: 100px;
64 background-position: center 20%;
65 }
66
67 .crop-bg div.container {
68 padding: 100px 0;
69 }
70 */
71}
72
73
74/* Want to have the full size bg banner image on the main page listing the Pou-s,
75but on each Pou landing page and each collection landing page, want a vertically
76narrower banner img. Achieved by cropping same image.
77 https://www.w3schools.com/cssref/pr_background-image.asp
78 and https://www.w3schools.com/cssref/pr_background-position.asp
79*/
80div.wsite-section-bg-image {
81 /*Can't set background-image as url contains variable: interfaces/{$interface_name}/images/digital-library.jpg*/
82 background-color: transparent; /* Used if the image is unavailable. OR: grey */
83 background-repeat: no-repeat; /* Do not repeat the image */
84 background-size: cover; /* Resize the background image to cover the entire container */
85}
86
87div.full-bg {
88 height: auto;
89 background-position: 50.00% 21.94%;
90 /*background-size: 100%;*/
91}
92
93/*
94 Non-mobile settings.
95 */
96@media screen and (min-width: 1025px) { /* bp-small */
97 div.crop-bg {
98 height: 230px; /* You must set a specified height */
99 background-position: center -100px; /* OR: center OR: center 20% */
100 /*display: block;*/ /* div with bg image needs to change from display: table-cell
101 to display: block when cropping bg image, as table-cell setting
102 overrides height customisation */
103 }
104 /* Restyle .container *descendant* of .crop-bg:
105 Padding can not be 100px as it is when .full-bg is in effect,
106 and should be no greater than 95px for .crop-bg, else there
107 appears a bottom border of sorts under the cropped image. */
108 .crop-bg div.container {
109 /* padding: 50px 0; */
110 }
111
112 /* Override: padding had made the login/search/browse nav buttons unavailable */
113 .banner-wrap .crop-bg .container {
114 padding: 0px;
115 }
116
117 #gs_content {
118 max-width: 70vw;
119 }
120}
121
122a, span#addNewMD, span#clearSaved {
123 text-decoration: none;
124 font-weight: normal;
125 color: rgb(86, 154, 189); /* a light blue */
126}
127
128/* rgb(79, 79, 78);*/ /* a dark black/grey */
129
130a:hover, span#addNewMD:hover, span#clearSaved:hover {
131 color: rgb(250, 138, 0); /*orange*/
132}
133
134div.outer {
135 line-height:1rem;
136 padding-top:2rem; /*5vh;*/
137}
138
139
140div.img-and-desc {
141 position: relative;
142 width:100%;
143 height:100%;
144 display: block;
145}
146
147div.img-and-desc a img {
148 border: none;
149}
150
151/*
152.container {
153 clear: right;
154 clear: left;
155 padding-top: 0;
156}
157*/
158
159#gs_content pre {
160 white-space: pre-wrap;
161}
162
163#gs_content, #gs_content paragraph, #gs_content p {
164 clear: both;
165 line-height: 1.7rem !important; /*1.3rem*/
166}
167
168#gs_content a {
169 line-height: 1.7rem;
170}
171
172/*
173#gs_content a:visited {
174 color:DarkGrey;
175}*/
176
177.wsite-content-title a {
178 color: white;
179 font-weight: bold;
180}
181div#coll-name-link a {
182 color: white;
183}
184
185/* overriding */
186.wsite-image {
187 position: relative;
188}
189/* overriding */
190#wsite-content div.img-and-desc div.paragraph {
191 position: absolute;
192 top: 0.5rem;
193 text-align: center;
194 color: white !important;
195 margin: 0.25rem 1.5rem 0.5rem 1.5rem;
196 font-size: 10pt !important;
197}
198
199span.pou-group-title { /* if overriding: #wsite-content div.img-and-desc div.paragraph a {*/
200 font-variant: small-caps;
201 color: white;
202 font-size:1.5rem;
203}
204
205div#wmtb-footer {
206 text-align: right;
207 margin: 0 2rem 2rem 2rem;
208}
209
210div#wmtb-footer a {
211 text-decoration: none;
212 font-weight: normal;
213}
214
215div#topline {
216 line-height: 1rem; /*overriding*/
217 padding-top: 0.5rem;
218}
219
220div#topline ul {
221 text-align: right;
222}
223
224div#topline li, div#topnav li, .query-form-links li, #wizardBar li {
225 display: inline;
226 /*text-transform: capitalize;*/ /* Will Titlecase all menus including Browsing Classifiers */
227}
228
229div#topline li, .query-form-links li, #wizardBar li {
230 margin: 0 0.5rem;
231}
232
233/* Special case: div#topnav li stretches over multiple lines as it contains a nested ul
234on its own separate line, since (the nested) ul is displayed as a block by default.
235Adding a positive right margin to div#topnav li means that after the nested ul block
236there's now a newline with margin space. We don't want this additional newline, so set
237margin-RIGHT of this outer li to 0 to prevent it. */
238div#topnav li {
239 margin: 0 0 0 1rem;
240}
241
242/*
243div#topnav li, .query-form-links li {
244 line-height: 2rem;
245}
246*/
247
248div#wizardContainer {
249 padding: 0rem 0 2rem 0;
250}
251
252/* To insert a | between nav menu links */
253/*div#topnav li::after, .query-form-links li::after {
254 content: " | ";
255}*/
256
257div#topnav {
258 float: left;
259}
260
261div#search, div#quicksearcharea {
262 float: right;
263}
264div.query-form-links ul, #advanced {
265 clear: right;
266 float: right;
267}
268
269div#coll-menus {
270 text-align:center;
271}
272
273div#topbar {
274 margin: 0 auto;
275 line-height: 1rem;
276}
277
278hr.spacer {
279 border: none; /*border-top: 1px solid black;*/
280 clear: right;
281 clear: left;
282 padding-bottom: 1rem;
283}
284
285
286#quickSearchSubmitButton {
287 width: 3rem;
288}
289
290#browse-search-bars {
291 max-width: 100vw;
292 /*padding: 1rem;*/
293 /*height: 10vh;*/ /* useful for selecting div in dev tools */
294 /* max-height: 10vh; */
295 height: auto;
296 padding: 0.5rem 0rem; /* have to set the rest to 0 */
297 /*background-color: rgba(255, 255, 255, 0.9);*/ /* https://stackoverflow.com/questions/10422949/css-background-opacity */
298 position: absolute; bottom: 0; left: 0; /* or: top: 60%; left: 0; */
299 /*Or: margin-top: -6rem; */
300 z-index:2;
301 background-color: rgba(255, 255, 255, 0.7); /* https://stackoverflow.com/questions/10422949/css-background-opacity */
302}
303
304#browse-search-bars #topbar {
305 line-height: 1rem;
306 /*margin:auto;*/
307 width: 90vw;
308}
309
310div.paramLabel, div.paramValue {
311 display: inline;
312 line-height: 2rem;
313}
314
315/* overriding main_style.css */
316.main-wrap .wsite-section-wrap:first-child .container {
317 padding-top: 0;
318}
319
320ul.drop-down-list {
321 padding-top: 0.5rem;
322}
323#advanced {
324 padding-top:0.2rem;
325}
Note: See TracBrowser for help on using the repository browser.