Git Product home page Git Product logo

Comments (2)

elisabetta-p avatar elisabetta-p commented on September 2, 2024

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 ? cssdisplay: 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.

HermanBide avatar HermanBide commented on September 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.