gest366.it/css/main.css

765 lines
14 KiB
CSS
Raw Permalink Normal View History

2021-04-29 18:03:28 +00:00
/*! HTML5 Boilerplate v7.2.0 | MIT License | https://html5boilerplate.com/ */
/* main.css 2.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/
/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */
html {
color: #222;
font-size: 1em;
line-height: 1.4;
}
/*
* Remove text-shadow in selection highlight:
* https://twitter.com/miketaylr/status/12228805301
*
* Vendor-prefixed and regular ::selection selectors cannot be combined:
* https://stackoverflow.com/a/16982510/7133471
*
* Customize the background color to match your design.
*/
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
/*
* A better looking default horizontal rule
*/
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/*
* Remove the gap between audio, canvas, iframes,
* images, videos and the bottom of their containers:
* https://github.com/h5bp/html5-boilerplate/issues/440
*/
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
/*
* Remove default fieldset styles.
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
/*
* Allow only vertical resizing of textareas.
*/
textarea {
resize: vertical;
}
/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */
.browserupgrade {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* ==========================================================================
Author's custom styles
========================================================================== */
@font-face {
font-family: alata;
src: url(../fonts/alata-regular.ttf);
}
@keyframes slider {
0% {left: 0; opacity: 0;}
5% {left: -50%; opacity: 1;}
15% {left: -50%;}
20% {left: -50%;}
25% {left: -50%; opacity: 1;}
30% {opacity: 0;}
35% {left: -150%; opacity: 1;}
40% {left: -150%;}
45% {left: -150%; opacity: 1;}
50% {opacity: 0;}
55% {left: -250%; opacity: 1;}
60% {left: -250%;}
65% {left: -250%; opacity: 1;}
70% {opacity: 0;}
75% {left: -350%; opacity: 1;}
80% {left: -350%;}
85% {left: -350%;}
90% {left: -350%; opacity: 1;}
95% {opacity: 0;}
100% {left: -450%;}
}
@keyframes pulse_animation {
0% { transform: scale(1); }
30% { transform: scale(1); }
40% { transform: scale(1.08); }
50% { transform: scale(1); }
60% { transform: scale(1); }
70% { transform: scale(1.05); }
80% { transform: scale(1); }
100% { transform: scale(1); }
}
@keyframes rotate {
25% {transform: rotate(90deg);}
50% {transform: rotate(180deg);}
75% {transform: rotate(270deg);}
100% { transform: rotate(360deg);}
}
/* ==========================================================================
Elementi comuni
========================================================================== */
body {
min-width: 320px;
grid-area: main;
background-image: url("../img/background.png");
background-repeat: no-repeat;
background-size: contain;
background-position: center 18em;
color: #2269ff;
font-family: alata;
}
main {
text-align: center;
}
.secondary-page {
background-position: center;
}
.button {
background-color: #2269ff;
border-radius: 10px;
padding: .6rem 1.2rem;
color: white;
border: none;
font-size: 2rem;
}
h1 {
margin-top: 0;
}
/* ==========================================================================
Header
========================================================================== */
header {
max-height: 15rem;
font-size: 2em;
margin: 1rem 1rem 0 1rem;
}
#logo {
max-height: 7rem;
float: left;
}
nav {
float: right;
}
#menu {
visibility: hidden;
list-style-type: none;
top: 13%;
right: 2%;
z-index: 20;
margin: 0;
max-width: 35%;
position: absolute;
padding: 15px;
background: white;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
-ms-border-radius: .5em;
border-radius: .5em;
box-shadow: .1em .1em .2em #2269ff;
}
#menu-logo:hover {
animation: rotate;
animation-duration: 1.5s;
animation-timing-function: linear;
}
#menu a{
font-size: 1.5rem;
text-decoration: none;
color: inherit;
}
/* ==========================================================================
Homepage
========================================================================== */
#impressum {
font-size: 2em;
margin: auto;
}
#slider {
overflow: hidden;
max-width: 100%;
display: block;
text-align: center;
margin: auto;
}
#features {
list-style-type: none;
font-size: 0;
padding: 0;
margin: 0;
position: relative;
left: 0;
width: 500%;
animation: slider 10s linear infinite;
}
.feature {
display: inline-block;
font-size: 1.5rem;
width: 20%;
}
#features > li > p {
margin: 0 auto;
font-size: 2rem;
}
.feature-icon {
text-align: center;
max-width: 100%;
}
.feature-icon > img {
max-width: 5em;
}
.button > a {
text-decoration: none;
color: inherit;
}
#download {
margin: 4rem auto;
padding: 2rem 0;
background: rgba(255, 255, 255, 0.5);
}
#download {
font-size: 2em;
}
#download p {
margin: 0;
}
#download-icon {
max-width: 5em;
}
#paypal {
width: 100%;
text-align: center;
font-size: 2em;
background: rgba(255, 255, 255, 0.7);
padding: 1rem 0;
margin: 3rem auto;
}
#paypal > p {
margin-bottom: 0;
}
#paypal-button-icon {
max-width: 4em;
}
#paypal-button-icon {
animation-name: pulse_animation;
animation-duration: 2000ms;
transform-origin: 70% 70%;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
#paypal-button-icon:hover,
#paypal-button-icon:focus {
animation-name: unset;
}
/* ==========================================================================
Cos'è
========================================================================== */
#about {
font-size: 1.2em;
margin: 4rem auto;
padding: 2rem 0;
background: rgba(255, 255, 255, 0.7);
max-width: 80%;
min-height: 100vh;
}
/* ==========================================================================
Download
========================================================================== */
#download-page ul {
margin: auto;
max-width: 40%;
text-align: left;
}
#stable-section {
font-size: 1.2rem;
}
#testing-section {
opacity: 0;
padding: 2rem 0;
font-size: 1.2rem;
}
/* ==========================================================================
Documentazione
========================================================================== */
#categorie-doc {
padding: 3rem 0;
max-width: 80%;
margin: auto;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
.categoria {
width: 20rem;
height: 10rem;
border-radius: 15px;
background-image: linear-gradient(to bottom right, #c025ff 0%, #2269ff 100%);
margin: 0 0 2rem 0;
display: flex;
flex-direction: row;
justify-content: stretch;
}
.categoria > p {
background-color: white;
border-radius: 15px;
font-size: 1.4em;
display: flex;
flex-direction: row;
justify-content: stretch;
align-items: center;
width: 100%;
margin: 5px;
}
.titolo-categoria > a {
text-decoration: none;
color: inherit;
}
.doc-icon {
max-width: 40%;
max-height: 100%;
float: left;
}
.titolo-categoria {
width: 100%;
}
.no-background {
background: none;
}
.doc-page {
text-align: left;
max-width: 80%;
margin: auto;
}
.doc-page h1 {
text-align: center;
}
.gui-interactive {
font-weight: bold;
}
.gui-input {
font-style: italic;
}
.gui-suggestion {
font-style: italic;
font-weight: bold;
}
.gui-element {
text-decoration: underline;
}
.vertical-rectangle {
display: table;
}
.non-inline {
max-width: 80%;
margin: 3em auto;
box-shadow: .4em .4em .8em #2269ff;
}
.non-inline img {
max-width: 100%;
}
.inline {
display: inline;
margin: 0 .1em;
}
.square {
max-width: 2em;
}
.rectangle {
max-height: 2.5em;
}
/* ==========================================================================
Footer
========================================================================== */
footer {
grid-area: footer;
background-color: #2269ff;
text-align: center;
color: white;
padding-top: 1rem;
}
#maintainers {
list-style: none;
padding: .5rem 0 2rem 0;
margin: auto;
text-align: center;
}
#maintainers li {
display: inline;
margin: auto;
}
#maintainers li:first-child {
margin-right: 10rem;
}
#maintainers a {
text-decoration: none;
color: white;
}
#maintainers a:hover {
text-decoration: underline;
}
/* ==========================================================================
Helper classes
========================================================================== */
/*
* Hide visually and from screen readers
*/
.hidden {
display: none !important;
}
/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
* causes content to wrap 1 word per line:
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/
.sr-only {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
white-space: nowrap;
width: 1px;
/* 1 */
}
/*
* Extends the .sr-only class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
white-space: inherit;
width: auto;
}
/*
* Hide visually and from screen readers, but maintain layout
*/
.invisible {
visibility: hidden;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.clearfix:before,
.clearfix:after {
content: " ";
/* 1 */
display: table;
/* 2 */
}
.clearfix:after {
clear: both;
}
/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */
@media only screen and (min-width: 1440px) {
body {
background-size: contain;
background-position: center;
}
#features {
margin: 3rem auto;
}
#menu {
top: 5rem;
max-width: 35%;
}
#download,
#paypal {
margin-top: 12rem;
}
#categorie-doc {
padding: 8rem 0;
}
.categoria {
width: 25rem;
}
#paypal {
background: rgba(255, 255, 255, 0.5);
}
}
@media only screen and (max-width: 1024px) {
header {
text-align: center;
max-height: 30rem;
}
#download {
margin-top: 2rem;
}
#maintainers li:first-child {
margin-right: 6rem;
}
}
@media only screen and (min-width: 769px) and (max-width: 840px) {
#categorie-doc {
justify-content: space-around;
}
}
@media only screen and (max-width: 768px) {
body {
background-size: cover;
background-position: center;
}
#menu {
max-width: 60%;
}
#download {
background: none;
}
main {
background: rgba(255, 255, 255, 0.5);
}
#categorie-doc {
justify-content: center;
}
}
@media only screen and (max-width: 400px) {
body {
background: none;
}
#menu {
max-width: 100%;
}
}
@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
/* Style adjustments for high resolution devices */
}
/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
https://www.phpied.com/delay-loading-your-print-css/
========================================================================== */
@media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important;
/* Black prints faster */
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
pre {
white-space: pre-wrap !important;
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
/*
* Printing Tables:
* https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
*/
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}