Accept font-family property
See original GitHub issueIn tailwind.config.js, I want to implement the following component but I can’t because “font-family” is ignored
plugins: [
plugin(function ({ addComponents }) {
addComponents({
h1: {
fontFamily: 'Roboto_300Light',
fontStyle: 'normal',
fontWeight: '300',
fontSize: 96,
lineHeight: '7rem',
letterSpacing: -1.5,
},
});
}),
]
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
CSS font-family property - W3Schools
The font-family property specifies the font for an element. The font-family property can hold several font names as a "fallback" system.
Read more >font-family - CSS: Cascading Style Sheets - MDN Web Docs
The font-family property specifies a list of fonts, from highest priority to lowest. Font selection does not stop at the first font in...
Read more >CSS: font-family property - TechOnTheNet
The CSS font-family property defines a prioritized list of font family names to apply to an element. Syntax. The syntax for the font-family...
Read more >TextElement.FontFamily Property (System.Windows.Documents)
This property specifies a preference only. If the specified font family is not available, the FlowDocument silently falls back to the font determined...
Read more >How does the font-family property work in CSS? - Stack Overflow
The font-family property holds several font names to provide a "fallback" system. The browser tries each font family in the order that they...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can create your own custom styles object and pass it in the
create
function. For example:Now
tailwind('h1')
will work.However, classes in
customStyles
won’t be suggested by the TailwindCSS Intellisense plugin because the plugin uses yourtailwind.config.js
file for suggestions.There seems to be plenty of tutorials about this, here’s one for example → https://dev.to/aneeqakhan/add-custom-fonts-in-react-native-0-63-for-ios-and-android-3a9e.