Comments (2)
Hi, here an example of code
export const AnchorWrapper = styled.div<{ selected: boolean }>
box-sizing: border-box; width: fit-content;${({ selected, theme: { colors, mediaQueries } }) => mediaQueries?.isMobile ? css
display: flex; flex-direction: row; align-items: center; padding: ${pxToRem(8)} 0 ${pxToRem(8)} ${pxToRem(16)}; border-left: ${pxToRem(3)} solid ${selected ? colors.lightAccentDefault : colors.neutral300};
: cssheight: ${pxToRem(56)}; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: ${pxToRem(21)} 0 ${pxToRem(14)}; gap: ${pxToRem(4)};
};
and this is the error on returned
`ERROR in ../ui/build/src/atoms/Anchor/styles.js Module build failed (from ../../node_modules/babel-loader/lib/index.js): Error: prj/ui.frontend/packages/ui/build/src/atoms/Anchor/styles.js: There was a problem adding namespaces to this CSS in the file prj/ui.frontend/packages/ui/build/src/atoms/Anchor/styles.js. Error: :6:3: Unknown word CSS: box-sizing: border-box; width: fit-content;
fake-element-placeholder-0 `
any known solution?
+1
from babel-plugin-styled-components-css-namespace.
could be an incorrect syntax error on your css
might want to check that
looks like your style component is missing braces:
Here's how you should wrap your CSS block inside the styled-component template literal:
export const AnchorWrapper = styled.div<{ selected: boolean }>`
/* CSS styles go here */
`;
Check for any syntax errors within the CSS block, such as missing semicolons (;), curly braces ({ }), or incorrect CSS property names.
from babel-plugin-styled-components-css-namespace.
Related Issues (20)
- Media Query String Interpolation Bug HOT 9
- Unable to make it work at all HOT 2
- Throw an error if defined after babel-plugin-styled-components HOT 3
- Valid CSS cannot be parsed HOT 5
- Issue in Component Interpolation inside `&.className` HOT 1
- Issue with nested pseudo-selectors in expressions HOT 1
- NodeJs compatibility HOT 2
- The development server NOT Starting HOT 2
- Example of a working setup with CRA and Customize-CRA?
- Support for style objects HOT 2
- Plugin gives errors in case of // comments HOT 3
- babel config problem HOT 2
- Conditional style is overwritten in loop when using cssNamespace HOT 5
- Plugin doesn't work with typescript HOT 2
- Works with Emotion? HOT 1
- Does not work at all
- Usage with in an NPM package
- Upgrading styled-components from 5.1.1 to 5.3.5 has broken the plugin HOT 2
- Plugin Not Working with Different Styled Component Syntax HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-styled-components-css-namespace.