Skip to content

Commit 71e6ce7

Browse files
author
rakeshAlgo
committed
Define custom margin top and bottom class for all screen
1 parent 9cd6c91 commit 71e6ce7

File tree

2 files changed

+211
-1
lines changed

2 files changed

+211
-1
lines changed

src/css/base.css

Lines changed: 207 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,217 @@ label::after {
198198
outline-width: 0;
199199
}
200200

201+
/* Common margin padding css class */
202+
/* margin-top */
203+
.mt-0 {
204+
margin-top: 0 !important;
205+
}
206+
207+
.mt-1 {
208+
margin-top: var(--base-extra-small-space) !important; /* 8px */
209+
}
210+
211+
.mt-2 {
212+
margin-top: var(--base-small-space) !important; /* 12px */
213+
}
214+
215+
.mt-3 {
216+
margin-top: var(--base-space) !important; /* 16px */
217+
}
218+
219+
.mt-4 {
220+
margin-top: var(--base-medium-space) !important; /* 24px */
221+
}
222+
223+
.mt-5 {
224+
margin-top: var(--base-large-space) !important; /* 32px */
225+
}
226+
227+
/* margin-bottom */
228+
.mb-0 {
229+
margin-bottom: 0 !important;
230+
}
231+
232+
.mb-1 {
233+
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
234+
}
235+
236+
.mb-2 {
237+
margin-bottom: var(--base-small-space) !important; /* 12px */
238+
}
239+
240+
.mb-3 {
241+
margin-bottom: var(--base-space) !important; /* 16px */
242+
}
243+
244+
.mb-4 {
245+
margin-bottom: var(--base-medium-space) !important; /* 24px */
246+
}
247+
248+
.mb-5 {
249+
margin-bottom: var(--base-large-space) !important; /* 32px */
250+
}
251+
201252
/* Responsive css */
202-
@media screen and (min-width: 1024px) {
253+
/* For tablet,ipad Portrait view mode 1024px screen */
254+
@media screen and (min-width: 740px) {
255+
/* Spacing media query */
256+
.mt-sm-0 {
257+
margin-top: 0 !important;
258+
}
259+
260+
.mt-sm-1 {
261+
margin-top: var(--base-extra-small-space) !important; /* 8px */
262+
}
263+
264+
.mt-sm-2 {
265+
margin-top: var(--base-small-space) !important; /* 12px */
266+
}
267+
268+
.mt-sm-3 {
269+
margin-top: var(--base-space) !important; /* 16px */
270+
}
271+
272+
.mt-sm-4 {
273+
margin-top: var(--base-medium-space) !important; /* 24px */
274+
}
275+
276+
.mt-sm-5 {
277+
margin-top: var(--base-large-space) !important; /* 32px */
278+
}
279+
280+
/* margin-bottom */
281+
.mb-sm-0 {
282+
margin-bottom: 0 !important;
283+
}
284+
285+
.mb-sm-1 {
286+
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
287+
}
288+
289+
.mb-sm-2 {
290+
margin-bottom: var(--base-small-space) !important; /* 12px */
291+
}
292+
293+
.mb-sm-3 {
294+
margin-bottom: var(--base-space) !important; /* 16px */
295+
}
296+
297+
.mb-sm-4 {
298+
margin-bottom: var(--base-medium-space) !important; /* 24px */
299+
}
300+
301+
.mb-sm-5 {
302+
margin-bottom: var(--base-large-space) !important; /* 32px */
303+
}
304+
}
305+
/* For tablet,ipad landscape mode 1024px screen */
306+
@media screen and (min-width: 993px) {
203307
.container-fluid {
204308
max-width: var(--width-container-fluid);
205309
padding: 0;
206310
margin: 0 auto;
207311
}
312+
313+
/* Spacing media query */
314+
.mt-md-0 {
315+
margin-top: 0 !important;
316+
}
317+
318+
.mt-md-1 {
319+
margin-top: var(--base-extra-small-space) !important; /* 8px */
320+
}
321+
322+
.mt-md-2 {
323+
margin-top: var(--base-small-space) !important; /* 12px */
324+
}
325+
326+
.mt-md-3 {
327+
margin-top: var(--base-space) !important; /* 16px */
328+
}
329+
330+
.mt-md-4 {
331+
margin-top: var(--base-medium-space) !important; /* 24px */
332+
}
333+
334+
.mt-md-5 {
335+
margin-top: var(--base-large-space) !important; /* 32px */
336+
}
337+
338+
/* margin-bottom */
339+
.mb-md-0 {
340+
margin-bottom: 0 !important;
341+
}
342+
343+
.mb-md-1 {
344+
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
345+
}
346+
347+
.mb-md-2 {
348+
margin-bottom: var(--base-small-space) !important; /* 12px */
349+
}
350+
351+
.mb-md-3 {
352+
margin-bottom: var(--base-space) !important; /* 16px */
353+
}
354+
355+
.mb-md-4 {
356+
margin-bottom: var(--base-medium-space) !important; /* 24px */
357+
}
358+
359+
.mb-md-5 {
360+
margin-bottom: var(--base-large-space) !important; /* 32px */
361+
}
362+
}
363+
/* For large desktop to small desktop screen */
364+
@media screen and (min-width: 1200px) {
365+
/* Spacing media query */
366+
.mt-lg-0 {
367+
margin-top: 0 !important;
368+
}
369+
370+
.mt-lg-1 {
371+
margin-top: var(--base-extra-small-space) !important; /* 8px */
372+
}
373+
374+
.mt-lg-2 {
375+
margin-top: var(--base-small-space) !important; /* 12px */
376+
}
377+
378+
.mt-lg-3 {
379+
margin-top: var(--base-space) !important; /* 16px */
380+
}
381+
382+
.mt-lg-4 {
383+
margin-top: var(--base-medium-space) !important; /* 24px */
384+
}
385+
386+
.mt-lg-5 {
387+
margin-top: var(--base-large-space) !important; /* 32px */
388+
}
389+
390+
/* margin-bottom */
391+
.mb-lg-0 {
392+
margin-bottom: 0 !important;
393+
}
394+
395+
.mb-lg-1 {
396+
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
397+
}
398+
399+
.mb-lg-2 {
400+
margin-bottom: var(--base-small-space) !important; /* 12px */
401+
}
402+
403+
.mb-lg-3 {
404+
margin-bottom: var(--base-space) !important; /* 16px */
405+
}
406+
407+
.mb-lg-4 {
408+
margin-bottom: var(--base-medium-space) !important; /* 24px */
409+
}
410+
411+
.mb-lg-5 {
412+
margin-bottom: var(--base-large-space) !important; /* 32px */
413+
}
208414
}

src/css/doc.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,10 @@ table.tableblock pre code.language-bash.hljs {
636636
margin-top: 1.5rem;
637637
}
638638

639+
.doc .dlist dt + dt {
640+
margin-top: var(--base-extra-small-space);
641+
}
642+
639643
.doc .dlist dd {
640644
margin-left: 1.5rem;
641645
}

0 commit comments

Comments
 (0)