Skip to content

I'm not sure I am fully understanding the 'content' colour feature. Could someone explain what I am doing wrong? #3114

Closed Answered by saadeghi
PaulHaze asked this question in Q&A
Discussion options

You must be logged in to vote

as I understand it, this colour is what will be applied to all 'content' within the top level block that has a colour applied.

Only for daisyUI components. For example when you use btn-primary the background color will be primary and the text color will be primary-content

For example in this instance I expect the block bg to be neutral, and the block text to be neutral-content:

<div class="mr-5 h-40 w-40 bg-neutral flex-center">
	<p class="">Test</p>
</div>

Yet even though the colour of the bg changes, the text content doesnt. The only way I can set the text to the be neutral-content is to actually specifiy it:

<p class="text-neutral-content">Test</p>

Is this how it IS supposed to w…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PaulHaze
Comment options

Answer selected by saadeghi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants