- This topic is empty.
-
AuthorPosts
-
March 13, 2014 at 1:36 pm #165703nixnerdParticipant
I just started doing this:
/////////////////////////////////// // Misc. Cascading Modifications // ///////////////////////////////////
Whereas I used to do this:
/* Misc. Cascading Modifications */
I don’t know why I changed it really. Probably for some visual breakup in really long stylesheets. Plus, it gives me a way to sort of
h1
andh2
my comments if that makes sense. I can create a hierarchy of heading comments. The main heading looks like the first one and the sub headings look like the latter. I’m sure I could develop this more to make my code even more readable.Also, I’ve been using a lot of partials in SASS. When they’re all combined, it’s easier for people I work with to see what the hell is going on if I use this method. Especially with more complex elements.
I know this makes my file size SLIGHTLY bigger but the difference I would imagine is VERY negligible.
Please share you ASCII commenting methods.
March 13, 2014 at 2:05 pm #165704AlenParticipant/** * * * */
March 13, 2014 at 2:12 pm #165708nixnerdParticipantClean @Alen. I dig it.
I think I’m going to roll like this from now one to keep it tidy:
// Heading // /* Sub-Heading */
March 13, 2014 at 7:07 pm #165735__ParticipantWhat @Alen is doing is JavaDoc (or PHPDoc, which is PHP’s version)-style comments.
Is’s a formalized syntax for code documentation. It can be parsed to auto-generate basic docs (many IDEs can read them, too). I’ve found it to be a great way to get myself to document my code.
When I need “section headings” in my code, I tend to borrow MarkDown syntax:
# HEADING # ## Sub-Heading ##
I used to do stuff like
/**************************** * Hello! * * this is an important note * ***************************** * please read it * * and know how cool I am * ****************************/
…but it was honestly just too hard to maintain.
March 13, 2014 at 8:41 pm #165739nixnerdParticipantI use hash comments in Python but can you use them in SASS/SCSS?
I could just go try it but I think the answer is no. I REAAAALLY prefer that look. It catches the eye very easily.
Comments in HTML are atrocious… to me anyway.
March 13, 2014 at 8:50 pm #165740__ParticipantI use hash comments in Python but can you use them in SASS/SCSS?
Nope.
Comments in HTML are atrocious… to me anyway.
<!doctype html> <head> <title>HTML Comments Aren't All That Bad</title> <head> <body> <?php /* this is an html comment (in that I am commenting on html) */ ?> </body> </html>
What’s the big deal?
March 14, 2014 at 12:31 pm #165840nixnerdParticipantWhat’s the big deal?
I suppose nothing. I was talking about this:
<!-- I am a comment -->
I just don’t like it. It doesn’t catch the eye enough… For me anyway. I get that highlighted syntax fixes this but I look at code in the terminal a lot.
I love the look of this:
# I am a comment.
BTW, I should have specified that I wondered if you could do this is CSS:
## I am a comment
But I guess that would always look like an ID in passing. Too bad…
March 14, 2014 at 12:33 pm #165841nixnerdParticipantSorry for that weird formatting ^
March 14, 2014 at 6:17 pm #165894__ParticipantWhat’s the big deal?
I suppose nothing…
I knew what you meant. That was just me being snarky again—i.e., “I’d rather type
<?php /* */ ?>
than<!-- -->
.”Sorry for that weird formatting ^
Yeah, I’ve been having that problem lately too. I love the new site layout, but the MD editor has gone completely wonky. And does anyone else have to click [Submit] twice?
March 14, 2014 at 6:20 pm #165895AlenParticipantAnd does anyone else have to click [Submit] twice?
Funny you say that, I had issues with double clicking previous implementation of submit button. Now, seems fine.
March 14, 2014 at 6:23 pm #165896chrisburtonParticipantAnd does anyone else have to click [Submit] twice?
I used to have to click it more than that. When I would click submit, it would hang for almost 2 minutes sometimes. I emailed the guy working on the backend of CSS-Tricks about this. No issues for me as of yet.
Edit: Of course as I go to post this, I’m having the problem.
March 14, 2014 at 8:59 pm #165901__ParticipantOf course as I go to post this, I’m having the problem.
Glad I could help.
August 13, 2014 at 10:19 pm #178965nixnerdParticipantHate to necro-bump this thread. But I just opened the browser console while visiting imgur and saw this:
_ (_) _ _ __ ___ __ _ _ _ _ __ | | '_ <code>_ \ / _</code> | | | | '__| | | | | | | | (_| | |_| | | |_|_| |_| |_|\__, |\__,_|_| __/ | |___/ ======================================== You opened the console! Know some code, do you? Want to work for one of the best startups around? http://imgur.com/jobs ========================================
August 13, 2014 at 10:22 pm #178968nixnerdParticipantBloody hell… I can never get the code blocks to behave like I want.
August 13, 2014 at 11:20 pm #178998__ParticipantBloody hell… I can never get the code blocks to behave like I want.
lol
I’ve seen that sort of thing before. I don’t recall where (not imgur). It’s a pretty neat idea.
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.