From bc4ff23fa8c2357cb83c6fac856ab108945ee304 Mon Sep 17 00:00:00 2001 From: sndrx Date: Sat, 17 Nov 2018 18:11:51 +0200 Subject: [PATCH] Added info about region comments (#21757) --- guide/english/css/comments-in-css/index.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/guide/english/css/comments-in-css/index.md b/guide/english/css/comments-in-css/index.md index 8788baebdb..72104e0417 100644 --- a/guide/english/css/comments-in-css/index.md +++ b/guide/english/css/comments-in-css/index.md @@ -101,6 +101,28 @@ h2 { Tip: Many code editors will comment a highlighted portion of text by typing `CMD + /` (Mac) or `CTRL + /` (Windows). +The best thing you can do in CSS with comments is the next thing: use Regions. Yes, the regions you use too in C#. +Regions are useful in a long CSS file, when you've got plenty of classes and sections to manage and organize. They are basically commented titles of specific sections. The best part about regions? You can collapse/expand them. + +Here's how region works: +``` css +/*#region Header */ + +.header { + font-size: 12px; +} + +/*#endregion */ + +/*#region Footer +------------------------------------------- */ + +.footer { + height: 20px; +} +/*#endregion */ +```` + ### More Information: * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments)