Skip to content

Commit 9358f94

Browse files
committed
chore: PR feedback
1 parent df6a284 commit 9358f94

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

packages/theming/demo/stories/ArrowStylesStory.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@ const StyledDiv = styled.div<Omit<IArgs, 'isAnimated'>>`
2626
box-shadow: ${p =>
2727
p.hasBoxShadow &&
2828
p.theme.shadows.lg(
29-
'8px',
30-
'12px',
31-
getColor({ theme: p.theme, hue: 'chromeHue', shade: 600, transparency: 0.15 })
29+
`${p.theme.space.base * (p.theme.colors.base === 'dark' ? 4 : 5)}px`,
30+
`${p.theme.space.base * (p.theme.colors.base === 'dark' ? 5 : 6)}px`,
31+
getColor({
32+
theme: p.theme,
33+
hue: 'neutralHue',
34+
shade: 1200,
35+
dark: { transparency: p.theme.opacity[800] },
36+
light: { transparency: p.theme.opacity[200] }
37+
})
3238
)};
3339
background-color: ${p => getColor({ theme: p.theme, variable: 'background.primary' })};
3440
padding: ${p => p.theme.space.xxl};

packages/theming/src/utils/arrowStyles.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ const positionStyles = (position: ArrowPosition, size: string, inset: string) =>
7575
}
7676

7777
/**
78-
* 1. Arrow positioning on the base element.
79-
* 2. Rotate the clipping mask depending on arrow position.
78+
* 1. Rotate the clipping mask depending on arrow position.
79+
* 2. Arrow positioning on the base element.
8080
*/
8181
return css`
8282
&::before,
8383
&::after {
84-
transform: ${transform}; /* [2] */
85-
${positionCss}; /* [1] */
84+
transform: ${transform}; /* [1] */
85+
${positionCss}; /* [2] */
8686
}
8787
`;
8888
};
@@ -130,10 +130,10 @@ export default function arrowStyles(position: ArrowPosition, options: ArrowOptio
130130
* 1. Set base positioning for an element with an arrow.
131131
* 2. Apply shared properties to ::before and ::after.
132132
* 3. Display border with inherited border-color
133-
* 4. Clip the inner square forming the arrow body into a triangle so that it
134-
* doesn't interfere with container content.
135-
* 5. Clip the outer square forming the arrow border into a triangle so that the
133+
* 4. Clip the outer square forming the arrow border into a triangle so that the
136134
* border merge with the container's.
135+
* 5. Clip the inner square forming the arrow body into a triangle so that it
136+
* doesn't interfere with container content.
137137
*/
138138
return css`
139139
position: relative; /* [1] */
@@ -153,14 +153,14 @@ export default function arrowStyles(position: ArrowPosition, options: ArrowOptio
153153
&::before {
154154
border-color: inherit; /* [3] */
155155
background-color: transparent;
156-
clip-path: polygon(100% ${beforeOffset}px, ${beforeOffset}px 100%, 100% 100%); /* [5] */
156+
clip-path: polygon(100% ${beforeOffset}px, ${beforeOffset}px 100%, 100% 100%); /* [4] */
157157
}
158158
159159
&::after {
160160
border-color: transparent;
161161
background-clip: content-box;
162162
background-color: inherit;
163-
clip-path: polygon(100% ${afterOffset}px, ${afterOffset}px 100%, 100% 100%); /* [4] */
163+
clip-path: polygon(100% ${afterOffset}px, ${afterOffset}px 100%, 100% 100%); /* [5] */
164164
}
165165
166166
${positionStyles(position, squareSize, inset)};

0 commit comments

Comments
 (0)