photo-gallery-styles

Design documents for photos.pablopie.xyz 📸️

styles.css (1903B)

  1 /*  This program is free software: you can redistribute it and/or modify
  2     it under the terms of the GNU General Public License as published by
  3     the Free Software Foundation, either version 3 of the License, or
  4     (at your option) any later version.
  5 
  6     This program is distributed in the hope that it will be useful,
  7     but WITHOUT ANY WARRANTY; without even the implied warranty of
  8     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9     GNU General Public License for more details.
 10 
 11     You should have received a copy of the GNU General Public License
 12     along with this program. If not, see <https://www.gnu.org/licenses/>. */
 13 
 14 body {
 15   background: #15151a;
 16   color: white;
 17   font: 14pt sans-serif;
 18 
 19   margin: 0;
 20   padding: 14pt;
 21 }
 22 
 23 a {
 24   color: white;
 25 }
 26 
 27 nav {
 28   margin-bottom: 14pt;
 29   font-weight: bold;
 30 }
 31 
 32 nav img {
 33   position: relative;
 34   top: .4rem;
 35 }
 36 
 37 #gallery {
 38   list-style: none;
 39   padding: 0;
 40   margin: 0;
 41 }
 42 
 43 #gallery li {
 44   display: block;
 45   margin-top: 7pt;
 46   border: solid 3.5pt white;
 47 }
 48 
 49 #gallery li::first-child {
 50   margin-top: 0;
 51 }
 52 
 53 #gallery li img {
 54   display: block;
 55   width: 100%;
 56 }
 57 
 58 figure {
 59   margin: 0;
 60 }
 61 
 62 figcaption {
 63   margin-top: 14pt;
 64   text-align: center;
 65   font-style: italic;
 66 }
 67 
 68 #picture-container {
 69   display: flex;
 70 }
 71 
 72 #picture-container img {
 73   max-width: 100%;
 74   margin: 0 auto;
 75   border: solid white 3.5pt;
 76 }
 77 
 78 footer {
 79   margin-top: 14pt;
 80   text-align: center;
 81 }
 82 
 83 @media (orientation: landscape) and (min-width: 800px) {
 84   body {
 85     padding: 14pt 15vw;
 86   }
 87 
 88   #gallery {
 89     display: flex;
 90     flex-wrap: wrap;
 91     gap: 7pt;
 92   }
 93 
 94   #gallery li {
 95     margin: 0;
 96     height: 200px;
 97     position: relative;
 98     flex: 1 1 auto;
 99   }
100 
101   #gallery li img {
102     object-fit: cover;
103     height: 100%;
104     vertical-align: middle;
105   }
106 
107   #gallery::after {
108     content: "";
109     flex-grow: 999;
110   }
111 
112   #picture-container img {
113     max-height: 90vh;
114   }
115 }
116