Skip to content

Commit 34c653b

Browse files
author
Luke Bowerman
authored
fix(reset): Refine reset for Legend and provide css classNames for downstream extension as-needed (#2341)
1 parent c777721 commit 34c653b

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

packages/components-providers/src/StyleDefender.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ export const styleDefenderCSS = css`
4646
}
4747
`
4848

49-
export const StyleDefender = styled.div`
49+
export const StyleDefender = styled.div.attrs(
50+
({ className = 'looker-components-reset' }) => ({ className })
51+
)`
5052
background: ${({ theme }) => theme.colors.background};
5153
5254
${styleDefenderCSS}

packages/components/src/Form/Legend/Legend.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ export const Legend = styled.legend
5959
})
6060
)<LegendProps>`
6161
${reset}
62+
border: none;
6263
${color}
6364
${space}
6465
${typography}
6566
`
67+
68+
/**
69+
* `border: none;` override is a product-targeted fix
70+
* @TODO - Remove targeted fix when mitigated downstream
71+
**/

packages/components/src/Portal/Portal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ Portal.displayName = 'Portal'
9898
* DOM-output so it re-injects `styleDefenderCSS` to do a light-weight
9999
* "CSS reset"
100100
*/
101-
const InvisiBox = styled.div<PortalPlacementProps>`
101+
const InvisiBox = styled.div.attrs(
102+
({ className = 'looker-components-reset' }) => ({ className })
103+
)<PortalPlacementProps>`
102104
${styleDefenderCSS}
103105
104106
align-items: ${({ vertical }) =>

0 commit comments

Comments
 (0)