Skip to content
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

✨ new(styles): added id as wrap for useStyles. #308

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ const SuiWrapper = ({ children, context }) => {

return (
<WordPress>
<div className={`sui-wrap sui-theme--${suitheme}`}>{children}</div>
<div id="sui-wrap" className={`sui-wrap sui-theme--${suitheme}`}>
{children}
</div>
</WordPress>
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/components/preview/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Preview: React.FunctionComponent<PreviewProps> = ({

return (
<Canvas className="csb-preview">
<div className="sui-wrap sui-theme--light">
<div id="sui-wrap" className="sui-wrap sui-theme--light">
{true === wrapper && (
<div className="sui-layout sui-layout--horizontal">{children}</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/use-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const CSS_SHORTHAND_MAPS: Record<string, string> = {
}

// We need this to wrap inline styles to prioritize
const parentSelector: string = "body .sui-wrap &"
const parentSelector: string = "body #sui-wrap &"

/**
* Build style object based on prop name and value
Expand Down