Whats “/* =SomeText” in css comments

WordPress style sheet comments have “/* =” before the name of the comment. Why isnt it just /* and why does it have “=” after it? Does it help to find comments easily or is it there for nothing?

Related posts

Leave a Reply

3 comments

  1. Even though I would highly recommend against using w3schools.com, they do a good job explaining this question:

    CSS Comments

    Comments are used to explain your code, and may help you when you edit the source code at a later date. Comments are ignored by browsers.

    A CSS comment begins with “/*“, and ends with “*/“, like this:

    /*This is a comment*/
    p
    {
    text-align:center;
    /*This is another comment*/
    color:black;
    font-family:arial;
    }
    

    Source

    Regarding the =, it may be used to specify a point in the comment that is used for replacing or formatting later.

    Update 1

    Found this regarding the = sign.

    Adding a marker to a comment block makes it more searchable. This is
    called flagged comment block. For example:

    /*= Header
     * - description -
     */
    

    In this case, the flag used is the equal sign (=). By using it as a
    search string in your editor, you can actually navigate through all
    your sections of your CSS file.

    However, a simple marker like an equal sign may be inappropriate when
    you want to be more specific. In this case, you can add an identifier
    to the flag:

    /*=head Header
     * - description -
     */
    

    Now you can search for =head in your editor. This is called a labeled
    flagged comment block.

  2. I think it’s mostly likely there to just help identify that comment (don’t know why you would need to, common sense says to place the comment where next to the code it’s referring to)

    all you need is just /*blah, blah, blah*/