![]() ![]() This means I can protect myself from preventable bugs caused by accidental comment nesting, and I’m happy now that I’ve found an alternative layout for header blocks using single-line comments.Īs with everything in programming, there is always more than one solution (and opinion!). Now my linter forces me to use single-line style comments in my Sass files. Personally, I’ve decided to enforce this rule with a setting of 2 in my sass-lint.yml config file: rules: If you’re willing to type a few extra keystrokes you can still have a good-looking (IMHO), stand-out title block without multiline comments: ////////////////////////////// The Sass guidelines do recommend using multiline comments, mainly for DocBlock type information at the top of a section. Comments like /***** Card Component *****/, or /* IE11 fix */ should only be seen by other developers in the source code. If you have many lines to comment out, then your editor shortcut for commenting (normally Cmd + /) should apply single-line comments even if you have many lines selected. It’s simpler and sometimes quicker to comment or uncomment single lines using this syntax, as your change only affects one line. These examples will cause errors in both CSS and Sass. The end of a comment - this code will errorĪnd also: /* Just a single-line comment /* cuckoo */ oh no */ Open Preview If your website consists only of static HTML files you can open Preview right away by hitting CTRL+L CMD+L external server 4. You can configure settings for your project from Project Settings. * I'm unexpectedly closing this comment */ Prepros is also very flexible so you can configure Prepros in way that fits your needs.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |