SOLVED: Container typography doesn't always work

Bricks Version: 1.3.5-beta
Browser: Firefox 93
OS: Windows 10

Applying ‘class’ to a container and trying to change color or text alignment and size doesnt work.

Have to keep adding the ‘class’ each time need to edit. Prefer this to be on by default when previously added.

Hi,

in case of headings, the color won´t change because of the default color (#212121) of the headings. I don´t know what it´s good for, but removing it won´t hurt I think. So it would be possible to change the color container-wide for all elements.

For text-alignment, it´s because the container is a flex container by default. You cannot change the alignment of its elements with text-align only, but with align-items: left / center / right or align-items: stretch + text alignment or align-self on the heading.

If you set the container to display: inline or block, you can use text alignment to align your content, but you won´t be able to use the flexbox utilities.

Check this out to learn everything you need to know about flexbox: A Complete Guide to Flexbox | CSS-Tricks

Best regards,
timmse

1 Like

I’m running into the same issue! I see the following code from frontend.min.css but for the life of me, I can’t figure out where this is coming from. The variable value is #212121 — is it possible that this is some sort of Bricks default color? As far as I can tell, I have not set a color for all headings, and I am definitely not working with this shade.

I’d like to set a default color via the body selector, and then have colors defined by the container similar to bonnie-clyde above.

h1, h2, h3, h4, h5, h6 {
    text-rendering: optimizeLegibility;
    color: var(--bricks-text-dark);
    font-weight: 500;
    margin: 0;
}

@sarah_lauden Yes, that’s the default color for heading in 1.4.0.2.

It has been fixed in a later update and is not the case in 1.5 RC.

Hi @sarah_lauden,

Yep, as Sridhar mentioned we removed the font-weight & color default values in Bricks 1.5 RC. Which you can download for testing from your account page: Account – Bricks

If it’s not working as expected, please let me know.

Best,
Thomas