oakmac/snowflake-css

flake anatomy terms

Closed this issue · 7 comments

quick verbiage check-in. Here are the words I am using so far. can you lock these in or suggest changes?

'flake' || 'selector':
button-primary-1234a
'hash':
1234a
'prefix':
button-primary-

flake , selector:
button-primary-1234a

hextail , tail:
1234a

prefix , base:
button-primary-

I like the idea of "tail". "hextail" is interesting!

Every flake is a css class selector.

Example: button-primary-f82e9

A flake begins with the base.

  • combination of lower-case letters and hyphens [a-z-]
  • must start with a letter [a-z]
  • must end with a hyphen [-]
  • Example: button-primary-

A flake ends with the tail.

  • combination of 5 hexadecimal characters (lower-case) [a-z0-9]
  • must contain one number [0-9]
  • must contain one hex-range letter [a-f]
  • Example: f82e9

NOTE: I don't personally have an opinion on which "part" the last hyphen goes on. Maybe it isn't in either and the two "parts" are joined by a hyphen. The answer is probably the one that takes the fewest words to explain.

Every flake is a css class selector.

Perfect

A flake begins with the base.

I don't love "base" here. Not sure of what to call this part yet though. Maybe just "name"? So we would say that foo-45ead has a name of "foo".

A flake ends with the tail.

"Every flake ends with a hextail. A hextail is a random ..."

Other misc:

  • I do not consider the hyphen as part of the hextail. We can just say that the name and the hextail are joined by a hyphen. On second thought, it simplifies the verbiage to consider the hyphen as part of the hextail. So we would say that the foo-bar-45e8c flake has a name of "foo-bar" and a hextail of "-45e8c". Simple enough.

  • Would be nice to have a diagram of this for the README.

Would be nice to have a diagram of this for the README

Something like this diagram would be helpful.

Thank you for creating this issue. Being consistent with the verbiage will help clarify documentation.

I update the README to clarify some terms here. Thank you for the initial idea of "hextail"! I think it's a good term to identify the random characters at the end of a flake.