Commenting CSS

I would love to be able to comment CSS. Sometimes there are gradient generators, etc. which provide links with the outputted code the enables you to quickly go back to the page where you created the gradient and make changes. Having the ability to keep that with CSS would be nice.

I just started using this program yesterday and I'm absolutely delighted with it. It's very simple to understand if you're coming from an editor like Atom or Sublime Text for doing your HTML, CSS, JavaScript, etc. I would highly encourage everyone who's new to this program to do the tutorial where you make a page from start to finish before passing judgement.

I'm sure I've already done this on another thread, but ....

+1 to adding CSS comments!

Has anyone tried putting in comments like the following, because it does work. I do realize what you want is a separate line item for your comments but this method does work in the app. I know it may not be the prettiest etc... but it allows you to achieve what you want.

.flex-align-items-center /* test comment */ {
  align-items:center /* test2 */;


Haha Saj, you would think we all would have tried that by now lol. I haven't even thought to try that, I'll check that out tomorrow. Hopefully it's searchable too as that would help with finding things when you need them as well. Thanks for that tip, that will suffice until they can add separate line comments!

Thank you, Saj! I'll start using that method.

@Saj and Martin,

Just tried the comment in the CSS as you suggestion Saj, but the issue here is not just that the comment isn't a separate line of it's own when added to the class names, but that it's also not colored differently as a comment "should" be in the code in order to see them better in BSS. Usually they are a grey or other color that isn't already used in the code coloring.

I prefer to have things for BSS even more so than for the exported pages, because most of what I do is within the app not the exported pages. Sure I look for things in the pages periodically, but most of the time I'm looking in the App itself for things, and this just doesn't quite give the results I'm looking for.

It "will" help for now for searching in order to help us keep our CSS cleaner (organized better as we can cordon off sections for specific categories of classes and ID's.

Just my opinion of course, but we really do need a full blown Commenting setup for both the HTML and CSS that we can utilize properly in the App.

This did give me an idea while playing around with it further just now though, I still want the full functionality, but for now I'm creating empty classes just for comments. This way when/if commenting is finally added, I can just replace them with the real comments. Here's what I'm doing right now if it helps anyone else (the tildes (~) are just so I can see it better lol):

.all-colors-comment /* ~ ~ ~ ~ ~ ALL COLORS ~ ~ ~ ~ ~ */ {

You do realize you can just do

/* ~ ~ ~ ~ ~ ALL COLORS ~ ~ ~ ~ ~ */ {

No need for the class declaration right :)


haha good call, no, if I had realized that I would have done it! LOL. Thanks again Saj, that makes it another step shorter and easier to use till we get the more functional update for it.

Ok so I just was messing around with this again, and although it "does" allow us to put the comments in as you suggest (in any of the suggestions), what it won't do is retain them at all if you decide to clean up your CSS file externally and reimport it. So, .... this really won't work for me at all this way. I tend to do a lot of rearranging of my classes and ID's since BSS always appends new ones to the end so they have to always be moved around. Much easier to do this externally and then just reimport it.

My findings are: - as long as I add the class before it, it will import the CSS file if I've edited it outside of BSS, but the comments are no longer there, only the empty classes. - if I don't add a class, and just add the comments per your last suggestion, then BSS will not import the file at all if I edit it outside BSS.

So for me it's back to square one. No comments :(

Good call there Jo. :)

I did think about what happens from an import.