Skip to content

Commit 3497b36

Browse files
akabirujudithroth
authored andcommitted
Add CSS BEM style selectors to for OpWorkPackageBlock
Allow for easier styling modifications downstream https://community.openproject.org/work_packages/69478
1 parent eee4134 commit 3497b36

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/components/OpenProjectWorkPackageBlock.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const SPACER_M = "8px";
2020
const SPACER_L = "12px";
2121
const SPACER_XL = "16px";
2222

23-
const Block = styled.div`
23+
const Block = styled.div.attrs({
24+
className: 'op-bn-work-package-block'
25+
})`
2426
--highlight-wp-background: var(--bn-colors-highlights-gray-background);
2527
[data-color-scheme="dark"] & {
2628
--highlight-wp-background: var(--bn-colors-disabled-text);
@@ -89,7 +91,9 @@ const WorkPackage = styled.div<{ in_dropdown?: string }>`
8991
`}
9092
`;
9193

92-
const WorkPackageDetails = styled.div`
94+
const WorkPackageDetails = styled.div.attrs({
95+
className: 'op-bn-work-package-block__details'
96+
})`
9397
display: flex;
9498
flex-wrap: wrap;
9599
gap: 0 10px;
@@ -118,7 +122,9 @@ const WorkPackageStatus = styled.div<{ base_color: string }>`
118122
background-color: ${() => statusBackgroundColor()};
119123
`;
120124

121-
const WorkPackageTitle = styled.div`
125+
const WorkPackageTitle = styled.div.attrs({
126+
className: 'op-bn-work-package-block__title'
127+
})`
122128
flex-basis: max-content;
123129
color: var(--bn-colors-editor-text);
124130
font-weight: 500;

0 commit comments

Comments
 (0)