Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Quark: How to change display height of Hero image

Solved by pamtbaau View solution

Started by Matthieu 6 years ago · 5 replies · 1550 views
6 years ago

@matteo, See '/user/themes/quark/scss/theme/_framework.scss': hero-large, hero-medium, hero-small, etc.

And its use ('hero-large') in frontmatter of 'item.md':

TXT
hero_classes: text-light title-h1h2 overlay-dark-gradient hero-large parallax
6 years ago

Thank you, but that does not solve my issue. It tracked it down to the
padding-top: 6rem;
padding-bottom: 7rem;
associated to class hero in theme.min.css
I do not manage to take them out, so I must sill have a misunderstanding on how this css is generated, and from where these informations are taken.

6 years ago Solution

@matteo,

If you don't want to build/compile SCSS, but instead override the generated css file css-compiled/theme.min.css, you can do the following:

  • In an inherited theme
  • Create file '/user/themes/<my-theme>/css/custom.css':
  • Add the following to 'custom.css'

    CSS
    // Use .hero-medium, or .hero-small, or ... depending on class set 
    // for `hero_classes` in the frontmatter of the page.
    .hero.hero-large {
      min-height: 500px;
    }
    
    .hero {
    padding-top: 6rem;
    padding-bottom: 7rem;
    }
    
  • Change the values for min-height, padding-top and padding-bottom to your liking.
6 years ago

Thank you, this is exactly what I wanted to do. This custom.css file will always override the definitions from the theme I inherited from ?

6 years ago

custom.css is the last css file loaded by Quark or its child themes and will hence override all earlier loaded stylesheets.

last edited 02/06/21 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by MarkP, 2 weeks ago
3 193 2 weeks ago
Themes & Styling · by TomW, 2 weeks ago
0 111 2 weeks ago
Themes & Styling · by themetman, 3 weeks ago
1 206 3 weeks ago
Themes & Styling · by AH, 1 month ago
1 324 3 weeks ago
Themes & Styling · by Bruno, 4 years ago
6 1523 3 weeks ago