Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@group and @override in CSS?

Tags:

css

I've seen this in a stylesheet and I was wondering if it actually does anything and if so, what does it do? Google doesn't seem to be helpful for me on this one. I've removed the url from the code but I was curious if this actually did anything. I see that it's commented out but I'm just curious. Is it strictly a stylistic thing to help the designer?

/* @override 
    <url of stylsheet>
*/

/* @group Colors */

/* Orange - ff7800 */
/* Gray Blue - 373d4a */

/* @end */
like image 423
Tyler Crompton Avatar asked Apr 23 '11 17:04

Tyler Crompton


1 Answers

As @frank mentioned, /* @group */ and /* @end */ are meta data used by Espresso. Below is a screen capture of this meta data in action. Folders are created in the Navigator on the right of the window.

Espresso With CSS Navigator

If you are using VI then you can add the following comment in the CSS file to create folds for quick navigation.

/*
 vim: set foldmethod=marker:
 vim: set foldmarker=@group,@end:
 vim: set nofoldenable:
*/

If you are unfamiliar with vim folds some of the key combos are:

:zM - Close all folds

:za - Open fold

:za - Close fold

:za - Toggle fold open/close

VI folds in action

like image 133
Matthieu Cormier Avatar answered Oct 03 '22 08:10

Matthieu Cormier