Suport #Region like C# in CSS editor to allow us to collapse/expand groups of related styles
610
Views
10
Comments
On our RadarOn our Radar
Frontend (App Interfaces)

Hello,

It would be nice if we could have regions (like in C#) inside CSS editor allowing us to categorize/group some related styles.


Here we have an enterprise theme app and in apps that we use it we override some styles, define new ones, create some temp workarounds, etc..


With regions we  would be able to expand and collapse this regions making the styles design more ease and organized.


Thank you!

The problem being that the CSS is currently used as-is, without any postprocessing. Since CSS doesn't have regions, postprocessing would be necessary.

The outlines that connects the begining { and the ending } of classes doesn't need post-processing?

No, but that's not regions, that's just the classes themselves. And it's not much use to be able to collapse/expand just the classes?

2018-10-29 13-00-29
Magda Pereira
Changed the category to
Frontend
Changed the status to
On our RadarOn our radar

Hi Márcio,

That is a great idea. Unfortunately there is no CSS standard for regions. How would you propose to mark the start and end of a region? A special kind of comment?

Cheers,
Tiago Simões

Merged this idea with 'CSS editor regions' (created on 06 Feb 2021 19:05:34 by Tiago Ribeiro)

Have the option to expand and collapse regions of the CSS with tags like /*#region*/ and /*#endregion*/ .

I know a new editor is in the works and this would be a nice to have when working with large CSS files!



This comment was:
- originally posted on idea 'CSS editor regions' (created on 06 Feb 2021 by Tiago Ribeiro)
- merged to idea 'Suport #Region like C# in CSS editor to allow us to collapse/expand groups of related styles' on 12 Aug 2021 02:42:58 by Justin James

Hi Tiago

The new CSS and JS editor that are part of the NextGen Service Studio, are using Monaco, which is the editor engine used in Visual Code. So yeah, I would be very surprised if it doesn't support collapse/expand of regions of code.

Regards,

Daniel



This comment was:
- originally posted on idea 'CSS editor regions' (created on 06 Feb 2021 by Tiago Ribeiro)
- merged to idea 'Suport #Region like C# in CSS editor to allow us to collapse/expand groups of related styles' on 12 Aug 2021 02:42:58 by Justin James

Great news!

Thanks Daniel




This comment was:
- originally posted on idea 'CSS editor regions' (created on 06 Feb 2021 by Tiago Ribeiro)
- merged to idea 'Suport #Region like C# in CSS editor to allow us to collapse/expand groups of related styles' on 12 Aug 2021 02:42:58 by Justin James
Changed the category to
Service Studio


This comment was:
- originally posted on idea 'CSS editor regions' (created on 06 Feb 2021 by Tiago Ribeiro)
- merged to idea 'Suport #Region like C# in CSS editor to allow us to collapse/expand groups of related styles' on 12 Aug 2021 02:42:58 by Justin James