166 lines
3.3 KiB
CSS
166 lines
3.3 KiB
CSS
/*---------------------------------------------*/
|
|
/*GLOBAL VARIABLE*/
|
|
:root {
|
|
--gap-unit: 10px;
|
|
--max-screen: 1500px;
|
|
--base-font-size: 10px;
|
|
--nav-height: 40px;
|
|
}
|
|
|
|
|
|
/*DEBUG*/
|
|
/* borders on mains elements of pages for debugging*/
|
|
body > *, body > .container_main > * {
|
|
/*
|
|
border: 1px solid red;
|
|
*/
|
|
}
|
|
|
|
/*---------------------------------------------*/
|
|
/*global settings*/
|
|
/*
|
|
--------------------- ---------------------
|
|
' NAV ' ' NAV '
|
|
'---------------------' '---------------------'
|
|
' ------------------- ' ' S ' INFOS ' A '
|
|
'' CONTAINER '' ' U ' ----- ' S '
|
|
'' --- ------- --- '' ' M ' TITLE ' I '
|
|
''' S '' INFOS '' A ''' ' M ' ----- ' D '
|
|
''' U '' ----- '' S ''' ' A ' M ' E '
|
|
''' M '' TITLE '' I ''' ' R ' A ' S '
|
|
''' M '' ----- '' D ''' ' Y ' I ' '
|
|
''' A '' M '' E ''' ' ' N ' '
|
|
''' R '' A '' S ''' '---------------------'
|
|
''' Y '' I '' ''' ' FOOTER '
|
|
''' '' N '' ''' '---------------------'
|
|
'''---''-------''---'''
|
|
''-------------------''
|
|
' FOOTER '
|
|
'---------------------'
|
|
|
|
navbar -> nav
|
|
container -> .container_main
|
|
summary -> aside.page_content
|
|
main -> main
|
|
infos -> .page.infos
|
|
title -> .page_title
|
|
asides -> aside.relative_content
|
|
footer ->
|
|
*/
|
|
|
|
/*ALL*/
|
|
/* by default all elements are verticals*/
|
|
body, body * {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
body > *:not(.container_main), aside, main {
|
|
padding: calc(var(--gap-unit) / 2);
|
|
}
|
|
|
|
/*HTML*/
|
|
html {
|
|
scroll-behavior: smooth;
|
|
/*default font-size for rem*/
|
|
font-size: var(--base-font-size);
|
|
}
|
|
|
|
/*BODY*/
|
|
/* the page is designed for a maximum screen*/
|
|
body {
|
|
max-width: var(--max-screen);
|
|
margin: auto;
|
|
}
|
|
|
|
/*NAVBAR*/
|
|
body nav {
|
|
flex-direction: row;
|
|
height: var(--nav-height);
|
|
border-bottom: 1px solid lightgrey;
|
|
}
|
|
body nav *:first-child {
|
|
margin-left: var(--gap-unit);
|
|
padding-left: 0px;
|
|
}
|
|
body nav > * {
|
|
margin: auto 20px;
|
|
padding: 0px 10px;
|
|
}
|
|
body nav * {
|
|
max-height: var(--nav-height);
|
|
}
|
|
|
|
/*CONTAINER*/
|
|
body .container_main {
|
|
flex-direction: row;
|
|
}
|
|
|
|
/*MAIN*/
|
|
body main {
|
|
}
|
|
body main > * {
|
|
margin: var(--gap-unit) 0px;
|
|
}
|
|
|
|
/*INFOS*/
|
|
body .page_path {
|
|
}
|
|
|
|
/*TITLE*/
|
|
body .page_title {
|
|
height: 100px;
|
|
border-bottom: 1px solid lightgrey;
|
|
}
|
|
body .page_title * {
|
|
margin: auto 0px;
|
|
}
|
|
|
|
/*ASIDES*/
|
|
body aside {
|
|
}
|
|
/* aside left is for page table of content */
|
|
body aside.page_content {
|
|
}
|
|
/* asides elements only have width if they have a child*/
|
|
body aside.page_content *:first-child {
|
|
width: 150px;
|
|
}
|
|
/* aside right is for links to relatives content*/
|
|
body aside.relative_content {
|
|
}
|
|
/* asides elements only have width if they have a child*/
|
|
body aside.relative_content *:first-child {
|
|
width: 200px;
|
|
}
|
|
|
|
/*FOOTER*/
|
|
body footer {
|
|
}
|
|
|
|
|
|
/*---------------------------------------------*/
|
|
/*DESIGN KEYWORDS*/
|
|
/* contains elements oriented vertically (default) or horizontally*/
|
|
.vertical {
|
|
flex-direction: column;
|
|
}
|
|
/* horizontal is only in web version, it becomes vertical in mobile design*/
|
|
.horizontal {
|
|
flex-direction: row;
|
|
}
|
|
/* self position of elements to the left, the right, or the center of their container*/
|
|
.right {
|
|
margin-right: 0px;
|
|
margin-left: auto;
|
|
text-align: right;
|
|
}
|
|
.left > * {
|
|
margin-left: 0px;
|
|
}
|
|
.center {
|
|
margin-right: auto;
|
|
margin-left: auto;
|
|
text-align: center;
|
|
}
|
|
|