I want to increase all font's sizes

I'm new to Filament, I'm trying to increase all fonts because it looks small, I tried modifying tailwind.config.js but it not affecting
theme: {
extend: {
lineHeight: {
3: '1.2rem',
4: '1.6rem',
// etc
},
fontSize: {
xs: ['1.3rem', {lineHeight: '2.5rem'}],
sm: ['1.4rem', {lineHeight: '2.7rem'}],
base: ['1.6rem', {lineHeight: '2.8rem'}],
// etc
}
},
},
theme: {
extend: {
lineHeight: {
3: '1.2rem',
4: '1.6rem',
// etc
},
fontSize: {
xs: ['1.3rem', {lineHeight: '2.5rem'}],
sm: ['1.4rem', {lineHeight: '2.7rem'}],
base: ['1.6rem', {lineHeight: '2.8rem'}],
// etc
}
},
},
What I'm doing wrong here?
9 Replies
Dennis Koch
Dennis Koch4w ago
By the way: it’s probably easier to just adjust the font size on html element.
Osamz
Osamz4w ago
but, If I want to edit whole texts size, will I add it on every html element? I didn't create a new theme, except it's required to change fonts size.
Dennis Koch
Dennis Koch4w ago
There is only one html element in the Dom 😅 And yes you need to create a theme because otherwise your config isn’t applied to anything.
Osamz
Osamz4w ago
but when I put font size in HTML tag, this will unify all fonts sizes, isn't? I don't want this, but I will try to make a new theme, I was searching for a shorter way to do this. Thank you. --- In new theme, will I edit the css of .sm .lg ...etc, right?
Dennis Koch
Dennis Koch4w ago
Ah okay. Thought you wanted to increase overall. Then just do your approach and make sure you have a theme You can just go own using the Tailwind config. But you need a CSS file that get compiled with your new settings and register it with Filament
Solution
LeandroFerreira
https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme if you create a custom theme, you can edit the sizes
...
theme: {
fontSize: {
'xs': '0.75rem',
'sm': '1rem',
'base': '1.1rem'
...
}
}
...
theme: {
fontSize: {
'xs': '0.75rem',
'sm': '1rem',
'base': '1.1rem'
...
}
}
Osamz
Osamz4w ago
Uh, thanks, now I understand that new theme cmd:
The command will create a CSS file and Tailwind Configuration file in the /resources/css/filament directory
Then, I put the my edits in this new tailwind config file, I did that, it works good, thanks for your patient, I didn't notice this line before in documentation, it's my bad.
Dennis Koch
Dennis Koch4w ago
You're welcome. Glad you got it working
Want results from more Discord servers?
Add your server
More Posts
Open custom modal action on record clickI need to open a custom modal action on row click. I've tried in `recordUrl()` and in `recordAction(Query string on simple resource modalsIs there a built-in way to fill the query string when the modal of a simple resource is open, so thaFilament Blade Components in non-filament frontendI did add @FilamentStyles and @FilamentScripts to my layout, I have everything set in vite.config.jsExporter MaxRows check earlyIs it possible to make the MaxRows() check in the export action check sooner? I have a very large tIs it possible to create a Filament settings page with a tabbed form, for multiple settings groups?I have created a few Filament Spatie Settings pages, but I feel like this quickly gets overwhelming Filament Performance Issue: Slow Response Time with SQL ServerI'm using Filament with SQL Server as my database. I'm experiencing intermittent performance issues Select form not retrieving data using getSearchResultsUsing()I am using dependent selection using getSearchResultsUsing(). I am in Coupon record creation using Aggregating relationships use two sums and calculate the percentage.I have two columns working for the Aggregating Relation but I don't see how to use the results in a export groups from tableHi I was I have a table that groups items to display a summary. I was wondering if it is possible toOpen the column visibility dropdown in the slideOverHi devs, is it possible to open a dropdown in a slideOver, similar to filters? https://filamentphp.