-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Possibly inconsistent ordering of classes in FL.com #514
Comments
Another place this problem can be reproduced is on a Faithlife.com page that renders Note import React, { useEffect, useState } from 'react';
import { Tab } from '@faithlife/styled-ui';
import styled from 'styled-components';
export const Tabs = ({ children, selectedTab }) => (
<Tab.Manager selectedTab={selectedTab}>
<Tab.List>
{React.Children.map(children, (tab) =>
tab ? (
<Tab paddingX={4}>
<TabLabel title={tab.props.title} shortTitle={tab.props.shortTitle} />
</Tab>
) : null
)}
</Tab.List>
<Tab.Panels display="grid" flexGrow={1}>
{React.Children.map(children, (tab) =>
tab ? (
<Tab.Panel display="grid" padding={tab.props.padding || 0}>
{({ selected }) => (
<RenderChildrenIfWasEverSelected selected={selected}>
{React.cloneElement(tab)}
</RenderChildrenIfWasEverSelected>
)}
</Tab.Panel>
) : null
)}
</Tab.Panels>
</Tab.Manager>
);
/* ... */ I think we could fix styled-ui's In the case of
The problem with |
I've not been able to reproduce this problem outside of Faithlife.com. Even after copy-pasting the problematic code directly into a new application: https://git.faithlife.dev/PatrickNausha/styled-ui-weirdness-investigation/blob/master/src/App.js |
It appears that downgrading I've tried varying combinations of the following
But the only thing that seems to work with styled-ui |
I saw styled-components/styled-components#3482 (comment) and tried cramming I ran
|
Describe the bug
On different environments and/ or versions of styled-ui we are getting different orders of classes on styled components.
To Reproduce
Steps to reproduce the behavior:
Have a styled Tab.Panel where you set
display: flex
Have it work on sui v6.7.0 and not work on v6.8.1
The text was updated successfully, but these errors were encountered: