function App() {
return (
<div className = "flex-row justify-items-center" >
<h1> MINIMAL LOL </h1>
</div >
);
}
ReactDOM.render( < App / > , document.getElementById('root'));
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.3.1/umd/react-dom.production.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<div id="root"></div>
This works as intended on Chrome:
However this is the result on Firefox:
When inspected on Firefox the flex-row class is grayed out and when hovered shows a tooltip "flex-direction has no effect on this element since it’s not a flex container".
The justify-items-center is also grayed out and shows a tooltip "justify-items has no effect on this element since it’s not a grid container".
Why is there a difference between Firefox and Chrome in rendering this classes?
2
Answers
justify-items
is not implemented for block-level layouts in Firefox yet. They have a new ticket opened for this 3 weeks ago.justify-items:center
should be working in block level layouts as mentioned in mdn and draft spec:For now, you can just use
text-center
if that’s all you need, or else you’ll need to use it along withgrid
.