How to retrieve leading of fontSize via the theme function #8471
Answered
by
adamwathan
maxhoffmann
asked this question in
Help
-
Hey everybody! I wonder if there is a way to retrieve the line height via the
const plugin = require("tailwindcss/plugin");
module.exports = {
theme: {
extend: {
fontSize: {
headline: ["3rem", "1.35"] // <-- line height defined here
},
},
},
plugins: [
plugin(function ({ addComponents, theme }) {
addComponents({
".headline": {
fontSize: theme("fontSize.headline"),
lineHeight: theme("fontSize.headline"), // <-- ??? unclear how to retrieve it here
},
});
}),
],
}; |
Beta Was this translation helpful? Give feedback.
Answered by
adamwathan
May 29, 2022
Replies: 1 comment
-
Try:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
maxhoffmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try:
theme("fontSize”)[“headline"][1]