Skip to content

[css] Support CSS property container-type #170589

Closed

Description

Support CSS property container-type.

Screenshot 2023-01-04 at 14 41 30

Browser support has grown rapidly in the 2nd half of 2022, now at 76%.

Activity

  1. changed the title [-]Support CSS property `container-type`[/-] [+][css] Support CSS property `container-type`[/+] on Jan 11, 2023
  2. added
    css-less-scss
    feature-request
    on Jan 11, 2023
  3. rdennis commented on Feb 10, 2023

    @rdennis

    The features needed for container queries are:

    properties

    at-rule

    length units

    • cqw
    • cqh
    • cqi
    • cqb
    • cqmin
    • cqmax

    image

  4. natirivero commented on Mar 14, 2023

    @natirivero

    +1

  5. tummalasujith commented on Mar 16, 2023

    @tummalasujith

    +1

  6. titisouven commented on Mar 22, 2023

    @titisouven

    +1
    Also other missing properties like x, y and rx (used with svg tag)

  7. matteorchard commented on Apr 6, 2023

    @matteorchard

    +1, lots of support already

  8. MichalNovotnyCZ commented on Apr 13, 2023

    @MichalNovotnyCZ

    +1

  9. swashbuck commented on Apr 13, 2023

    @swashbuck

    +1

  10. SelfMadeSystem commented on Apr 14, 2023

    @SelfMadeSystem

    +1.0000000000000002

  11. bandarupk commented on Apr 14, 2023

    @bandarupk

    When you will release update on this?

  12. hirasso commented on Apr 20, 2023

    @hirasso

    People, could you please refrain from posting +1-comments? This puts unnecessary stress on the maintainers. They will take care of this, even without additional noise from the "community".

    They actually also took care of creating this amazing free and open source editor everyone of you is using 😄

    A more constructive way to communicate your interest in a feature is to add a 👍 emoji to the original post.

    Thank you! 🙏

  13. 11 remaining items

  14. coolCucumber-cat commented on Sep 15, 2023

    @coolCucumber-cat

    + Container properties no longer show as errors
    + Hovering over the properties shows the MDN reference
    + Container query units are display correctly

    - Still shows errors for container rules (and incorrect syntax highlighting for the name and params)
    - Still no Intellisense in containers (syntax highlighting works but you can't even hover)

  15. FifthTundraG commented on Sep 18, 2023

    @FifthTundraG

    Commit #193333 officially adds container, container-name, and container-type support. There are still some complications with the addition of @container, though.

  16. aeschli commented on Oct 11, 2023

    @aeschli
    Contributor

    Parsing support for @container got added by microsoft/vscode-css-languageservice#365

  17. aeschli commented on Oct 23, 2023

    @aeschli
    Contributor

    Verify that @container rules parse without validation errors. Search the web for some examples.
    Also verify that there's code completion support and color decorators for statements inside rules
    Verify that you can use length usints: cqw, cqh, cqi, cqb, cqmin, cqmax

    @container (min-width: 700px) {
      .card h2 {
        font-size: max(1.5em, 1.23em + 2cqi);
      }
    }
    
  18. lauslim12 commented on Nov 4, 2023

    @lauslim12

    Hi there! My apologies for commenting on a closed issue. Please let me know if this issue belongs elsewhere or if I should create an issue in another repository. It seems like this problem still persists in SCSS (not CSS), as you can see in the following screenshot:

    Screenshot 2023-11-04 at 15 51 25

    As you can see from the screenshot above, I'm trying to use cqw in order to implement a text whose font size could fill the parent container. If you take a look at below screenshot, the CSS version is fine.

    Screenshot 2023-11-04 at 15 51 50

    Is this a known issue? Thank you very much for your help!

    For additional information, I'm using the latest version of VSCode and MacOS as the development machine.

    $ code --version
    1.84.0
    d037ac076cee195194f93ce6fe2bdfe2969cc82d
    x64
  19. dalmolinz commented on Nov 6, 2023

    @dalmolinz

    Still a problem in 1.84.0 (scss)
    image
    image

  20. starball5 commented on Nov 6, 2023

    @starball5

    Is there an issue ticket yet for adding support to SASS/SCSS? Or should one be created?

    If anyone creates one, please ping me there with @starball5.

  21. aeschli commented on Nov 7, 2023

    @aeschli
    Contributor

    Please open a new issue with the sample code to reproduce.

  22. lauslim12 commented on Nov 8, 2023

    @lauslim12

    I created an issue here: #197744. Thank you for looking into it!

  23. locked and limited conversation to collaborators on Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

css-less-scssfeature-requestverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions