Articles by

Chris Coyier

Founder, writer, designer, spam-deleter, email personality

CSS4 is a Bad Idea

Direct Link

Louis Lazaris, reacting to the idea of CSS4:

The reason “CSS3” worked is because it was real. It was the successor to “CSS2.1”. Everything after CSS2.1 was considered to be under the umbrella of “CSS3”.

The gist is that …

Direct link to the article CSS4

CSS4

What is CSS4? Is it a real thing? I hate to break it to you, but not really. But maybe we could make it a thing? CSS3 was successful, so why not keep that train rolling like they do in JavaScript?
(Updated on )

Test if String Starts With Certain Characters in PHP

We can test if a certain string is the exact start of another string:

<?php 
  
function startsWith($string, $startString) { 
  $len = strlen($startString); 
  return (substr($string, 0, $len) === $startString); 
} 

// usage
echo startsWith("cat", "c"); // true
echo startsWith("dog", "x"); //