vscode-styled-components icon indicating copy to clipboard operation
vscode-styled-components copied to clipboard

No intellisense on nested css blocks.

Open jesus-pacheco opened this issue 3 years ago • 5 comments

Describe the bug (including copyable syntax) When creating new blocks of CSS code based on props we don't get any intelissense or validation at all. i.e.

const Header = styled.header`
   width: 100%;
   text-align: center;
   ${(props) => props.isHighlighted && `
      color: blue; // This CSS block won't provide any intelissense
      font-weight: 500;
  `}
`;

To Reproduce Create a regular styled component and add a whole CSS block based on a prop.

Expected behavior I will get intelissense and rule validation in the nested CSS block.

Build environment (please complete the following information):

  • OS: [Mac OS Catalina]
  • VSCode Version: [1.55.2]
  • Extension Version [1.5.1]

jesus-pacheco avatar Apr 26 '21 21:04 jesus-pacheco

Possibly related to https://github.com/microsoft/typescript-styled-plugin/issues/113

jasonwilliams avatar Apr 26 '21 23:04 jasonwilliams

+1

Screen Shot 2021-05-06 at 8 54 45 AM

rkingon avatar May 06 '21 15:05 rkingon

Same problem here with breakpoint-styled-components:

image

ernestrudziec avatar May 06 '21 17:05 ernestrudziec

Does anybody want to fix this? It should be a case of adjusting the regex https://github.com/styled-components/vscode-styled-components/blob/master/CONTRIBUTING.md

jasonwilliams avatar Nov 14 '21 12:11 jasonwilliams