SAE-A2-TruthInquiry/truthinquiry/static/css/game_ui_start.css
AudricV 14747b53b7
[Client] Refactor start game style
- Order properties alphabetically
- Use colors variables from global style
- Merge some common properties between selectors into a common declaration
- Do some minor improvements
2023-02-16 11:08:37 +01:00

169 lines
3.3 KiB
CSS

/* Common properties */
:root {
--game-begin-margin: 2em;
--header-actions-height: 3em;
}
input, .action_button, .game_mode_item_title {
font-family: "Titan One", sans-serif;
}
.game_begin, .game_mode_item, .game_mode_item_input_text_single_line, .game_mode_items, .game_mode_selection {
align-items: center;
display: flex;
justify-content: center;
}
.game_begin, .game_mode_item, .game_mode_selection, .game_mode_items {
flex-direction: column;
}
.game_mode_item_input_text_single_line, .game_mode_items {
flex-direction: row;
flex-wrap: wrap;
}
button {
background-color: transparent;
border: none;
cursor: pointer;
padding: 0;
}
input {
background-color: var(--game-white);
border: none;
border-radius: 1em;
font-size: 1em;
padding: 0.5em;
color: var(--game-black);
}
input::placeholder {
color: var(--game-black);
opacity: 0.5;
}
.back_btn {
fill: var(--game-red);
}
.game_begin {
background-image: url("../images/start_background.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border-radius: 1.5em;
flex-wrap: wrap;
/*
Viewport height - body margin (x2: top + bottom) - header actions height
- footer links height - game begin margin
*/
height: calc(100vh - var(--body-margin) * 2
- var(--game-begin-margin) * 2
- var(--header-actions-height)
- var(--footer-links-height));
justify-content: center;
margin: var(--game-begin-margin);
}
.game_title {
color: var(--game-red);
font-family: "Spicy Rice", serif;
font-size: 5em;
font-weight: bold;
margin: 0.25em;
text-align: center;
}
.ingame {
margin: 0;
}
.header_actions {
display: flex;
height: var(--header-actions-height);
justify-content: flex-end;
}
.action_button {
margin-left: auto;
margin-right: auto;
text-transform: uppercase;
}
.action_button:hover {
box-shadow: 10px -10px 25px 0px var(--game-black), -10px 10px 25px 0px var(--game-black);
transform: translate(0.1em, 0.1em);
}
.game_mode_selection {
background-image: url("../images/start_background.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
flex-wrap: nowrap;
height: 100vh;
}
.game_mode_item {
align-content: center;
margin: 0.5em;
}
.game_mode_item_title {
font-size: 2em;
margin: 0.25em;
}
.game_mode_item_input_text_single_line {
margin-bottom: 0.5em;
margin-top: 0.5em;
}
.game_mode_choice_selector {
background-color: var(--game-black);
border-color: var(--game-white);
border-style: solid;
border-radius: 1.5em;
padding: 1em;
}
.game_start_failed {
color: var(--game-red);
font-family: "Roboto Mono", sans-serif;
font-size: 1.5em;
font-weight: bold;
margin-bottom: 0.25em;
margin-left: 0.5em;
margin-right: 0.5em;
margin-top: 0.25em;
}
.theme_switcher_btn {
fill: var(--game-white);
transition: fill 0.5s;
}
.theme_switcher_btn:hover {
fill: var(--button-links-gray);
}
#back_button {
left: 0;
position: absolute;
top: 0;
}
#create_room_button, #join_room_button, #start_solo_game_button {
font-size: 1.5em;
}
#game_username {
width: calc(100% - 1.25em);
}
#play_button {
font-size: 3em;
}