Closed davidbwaters closed 1 year ago
I am not able to reproduce this. Are you using Figmagic 4.5.0
? Even the mixed-use messy example here works as intended.
CSS code with a bit of omissions:
const ButtonWithFramesCss = `
<...>
&.NormalGroup {
padding-left: ${spacing['small']};
padding-right: ${spacing['small']};
background-color: ${colors['blue1']};
&:disabled {
background-color: ${colors['gray1']};
}
}
&.Normal {
padding-left: ${spacing['small']};
padding-right: ${spacing['small']};
background-color: ${colors['blue1']};
&:disabled {
background-color: ${colors['gray1']};
}
}
&.Warning {
padding-left: ${spacing['small']};
padding-right: ${spacing['small']};
background-color: ${colors['orange']};
&:disabled {
background-color: ${colors['gray1']};
}
&:hover {
background-color: ${colors['yellow']};
}
}
&.Error {
padding-left: ${spacing['small']};
padding-right: ${spacing['small']};
background-color: ${colors['red']};
&:hover {
background-color: rgba(123, 34, 34, 1);
}
}
`;
export default ButtonWithFramesCss;
Note that :
is not an exclusion pattern, but a way to express text being text (i.e. root of element) and then, when used for frames/groups, for subclassing.
Sorry I updated the file with a workaround. I'll post a fork with it how it was, but basically it's the button component's hidden icon with text layer. When it's prefixed with an underscore, it still gets output with the underscore in the class name.
I have indeed seen that (root) elements prefixed with an underscore were not ignored. I will push that fix later in 4.5.1
.
EDIT: Out now, see https://github.com/mikaelvesavuori/figmagic/releases/tag/v4.5.1
Awesome, thanks!
Let's close this one as there is nothing more to add here?
Hey, I'm still having the issue after the update. This is the file you can test with. It's the button element's _with-icon child. https://www.figma.com/file/cTi2jRPF169TxakM3pX6Dt/MTX-Figmagic-(Copy)?node-id=3914%3A9510
I don't have permission to access the file.
I am just toying a bit with what I already have and I am pretty sure I see the issue. Figmagic is hard-wired to support only limited nesting, so not only will not underscore exclusions not work, nothing else will either if it's not found in either the root OR in the first-level frames/groups.
When I have access I'll try to verify your new file with my statement.
sorry, I updated the sharing settings
Hey again. Sorry for being late to this. Looking at the file, this is still a structural error in your file rather than with Figmagic itself. The "root" Button should not contain the variants, you will need to drag these into individual, independent frames/groups.
I am ready to close this, if you are OK with it @davidbwaters and have verified that Figmagic is ignoring as per the expected pattern I have written about?
Closing because of lack of activity
Describe the bug Hi, since you added support for frame variants, it's not ignoring prefixed frames with the '_' or ':' prefixes
Expected behavior These shouldn't be added to the output.