Rounded corners for Icon block UPs and Text block. #1697
Replies: 1 comment
-
Closing the discussion as it is not needed now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A new requirement has come from @jeremy brown regarding adding the functionality of rounded corners for borders of Icon block UPs and Text blocks :(https://jira.corp.adobe.com/browse/MWPW-140747)(https://jira.corp.adobe.com/browse/MWPW-140739).
As part of a JIRA ticket https://jira.corp.adobe.com/browse/MWPW-137906) we had a requirement to add rounded corners to borders of the block and borders of images inside the block. It was confirmed by @danielle Mariott that the functionality is needed only for Media and Brick block after a concern was raised by @auniverseaway that this functionality should be for specific blocks only.
For the same we have created a rounded-corners.css where mentioned the various dimensions of the rounded-border corners and in media and brick block we check if the block has rounded-corners as a class substring and if it has then we import rounded-corner.css file.
For Icon block and Text block as well we will do the same and add the following code as we did in Media and brick block
const { miloLibs, codeRoot } = getConfig();
const regex = /rounded-corners/g;
const base = miloLibs || codeRoot;
if ([...el.classList].some((c) => regex.test(c))) {
loadStyle(
${base}/styles/rounded-corners.css
);}
I would appreciate confirmation on whether it's fine to proceed with implementing rounded border functionality in Icon Block UPs and Text Blocks.
@auniverseaway @chrischrischris @rgclayton @ryanmparrish @vhargrave @overmyheadandbody @amitbikram @salonijain3 @dstrong23
Beta Was this translation helpful? Give feedback.
All reactions