Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Overwriting Heading variables #10546

Closed
ottz0 opened this issue Feb 12, 2020 · 4 comments
Closed

[Feature Request] Overwriting Heading variables #10546

ottz0 opened this issue Feb 12, 2020 · 4 comments
Labels
duplicate The issue has already been reported invalid The issue is missing information or is not a valid bug/feature request

Comments

@ottz0
Copy link

ottz0 commented Feb 12, 2020

Problem to solve

I am trying to overwrite the Vuetify Heading variables. I am using the variables.scss file in the scss folder as per setup and this works correctly as I can update $border-radius-root and $card-elevation variables in which it updates.

Iv'e looked at the vuetify SASS docs and have put the following in my variables doc

$headings: (
'h1': (
'size': 8.3125rem,
'line-height': 1.15em
)
)

However it doe not update.

What are the steps and process to update and overwrite the $headings variables for H1,H2,body-1 etc as I have tried every approach.

Proposed solution

Documentation on how to update and overwrite heading variables

@ghost ghost added the S: triage label Feb 12, 2020
@Tarabass
Copy link

Are you also defining the style onto a h1 like this?

h1 {
  font-size: map-deep-get($headings, 'h1', 'size');
  line-height: map-deep-get($headings, 'h1', 'line-height');
}

@ottz0
Copy link
Author

ottz0 commented Feb 14, 2020

$headings: () !default;
h1 {
font-size: map-deep-get($headings, 'h1', '80');
line-height: map-deep-get($headings, 'h1', '25');
}

I get a compilation error saying $headings isn't a valid css value

@Tarabass
Copy link

First you declare a sass variable with all your desired values. Then you use that sass variable (object) to set your styling using map-deep-get, which is just sass..

This should work:

$headings: (
  'h1': (
    'size': 6rem,
    'line-height': 6rem
  ),
  'h2': (
    'size': 2.5rem,
    'line-height': 2.5rem
  )
)

h1 {
  color: map-deep-get($material-light, 'text', 'primary');
  font-size: map-deep-get($headings, 'h1', 'size');
  line-height: map-deep-get($headings, 'h1', 'line-height');
}

h2 {
  color: map-deep-get($material-light, 'text', 'secondary');
  font-size: map-deep-get($headings, 'h2', 'size');
  line-height: map-deep-get($headings, 'h2', 'line-height');
}

@KaelWD
Copy link
Member

KaelWD commented Feb 14, 2020

Duplicate of #9306

@KaelWD KaelWD marked this as a duplicate of #9306 Feb 14, 2020
@KaelWD KaelWD closed this as completed Feb 14, 2020
@KaelWD KaelWD added invalid The issue is missing information or is not a valid bug/feature request duplicate The issue has already been reported and removed S: triage labels Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate The issue has already been reported invalid The issue is missing information or is not a valid bug/feature request
Projects
None yet
Development

No branches or pull requests

3 participants