Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Quark: How to change display height of Hero image

Solved by pamtbaau View solution

Started by Matthieu 5 years ago · 5 replies · 1100 views
5 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
5 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.

5 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.
5 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 ?

5 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 Pedro M, 2 months ago
4 202 2 months ago
Themes & Styling · by Ian, 2 months ago
3 98 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 461 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 52 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 132 3 months ago