Skip to content

Instantly share code, notes, and snippets.

@7studio
Created November 18, 2014 08:10
Show Gist options
  • Save 7studio/4ce734453cc46586be1a to your computer and use it in GitHub Desktop.
Save 7studio/4ce734453cc46586be1a to your computer and use it in GitHub Desktop.
Is there a way to comment this statement including the comments?
/*
* 1. …
* 2. Autorise la cessure à l'intérieur de la chaîne qui sera affichée
* pour éviter son dépassement de la boîte de page.
*/
a::after {
font-size: .83em; /*1 */
word-wrap: break-word; /* 2 */
}
a[href^="/"]::after {
content: "\0A0(http://www.7studio.fr" attr(href) ") ";
}
a[href^="http"]::after,
a[href^="//"]::after {
content: "\0A0(" attr(href) ") ";
}
@7studio
Copy link
Author

7studio commented Nov 18, 2014

It should be a good habit to comment every line of code (cf.: Keep Calm and Write Sass) but it becomes awful when you want comment some lines already commented.
Have you any thoughts on how I can do it?

Many thanks,
Xavier.

@KittyGiraudel
Copy link

You mean when you want to comment the whole thing for testing/debug purpose?

@7studio
Copy link
Author

7studio commented Nov 18, 2014

Yeah or something else ;) But I don't want to do something like that:

/*
 * 1. …
 * 2. Autorise la cessure à l'intérieur de la chaîne qui sera affichée 
 *    pour éviter son dépassement de la boîte de page.
 *//*
a::after {
  font-size: .83em; /*1 *//*
  word-wrap: break-word; /* 2 *//*
}
a[href^="/"]::after {
  content: "\0A0(http://www.7studio.fr" attr(href) ") ";
}
a[href^="http"]::after,
a[href^="//"]::after {
  content: "\0A0(" attr(href) ") ";
}
*/

@KittyGiraudel
Copy link

Yeah. I don't think it will be easily doable.

That being said, commented code should never be commited to the repository, so since it's only about debugging, I suggest you just delete the block only to add it back later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment