Most browsers use a prefix for their experimental CSS features. For example
-moz-boxsizing is used by Mozilla browsers to alter the default CSS box model used to calculate widths and heights of elements (reference). But when these properties are searched in Google, they generate no results:
As weird as it looks there is a reason for it: Google interprets the leading hyphen as a negation operator. In other words when you’re searching for
-moz-boxsizing, you are in fact searching the internet for all articles that don’t have “moz-boxsizing” in them. In fact at the moment Google search isn’t smart enough to know:
- Searching all internet excluding a phrase is a none-sense search
- When the only term in the search box starts with a hyphen, there’s a good chance that term is the actual search term
Of course there are several workarounds for this:
- Embed the search term in quotation marks to force Google search for your term. i.e. “-moz-boxsizing”
- Remove the hyphen from the beginning of the search term. i.e. moz-boxsizing
The problem is that the search experience is not as smooth as it can be and you have to edit your search term. Those few key strokes waste time and for a search engine that takes pride in its usability, this is a problem. It is the machine that should adapt to humans, not the other way around. Why? Because we created the machine to serve us, not the other way around.
Apart from the workarounds above, there is a very simple solution to this issue. The search interpretation algorithm can be optimised to consider two things:
- If the search term starts with hyphen and it is the only term in the search box, assume it is quoted. You can even show it as quoted in the result page, if you want to teach people about that workaround, but please don’t stop them with the wrong error message (no results) and expect them to find that help page. Remember, most people don’t even know the search operators. Should they be punished with waste of time, wrong error message and forcing them to edit their term? I don’t think so.
- As a quick hack, let people search for vendor prefixed CSS attributes. This solves the problem for web developers, but an extension to this idea can involve some R&D. The search analysts at Google probably can do a little research and see how many search terms that started with a negative operator is followed up with removal of that operator. Probably this gives a signal on what search terms actually need to start with a hyphen. As a practice I suggest you compare the result of searching for ls vs. ls -l