chharvey / chharvey.github.io

My personal web site.
https://chharvey.github.io/
MIT License
4 stars 1 forks source link

inline lists and items #31

Closed chharvey closed 9 years ago

chharvey commented 9 years ago

Fix .List.I for inline items. This is misleading, as the list itself is displayed like a block but its items are displayed inline.

Rather, a list that is displayed inline is called an .Enum, which is even more confusing.

Should the display of the items be specified on the .Item Object rather than the .List Object?

First Suggestion: reuse subclasses:

.List {display: block;}
.List.I {display: inline} /* formerly, `.Enum`s */
.Item {display: block;} /* may be children of `.List`s as well as `.List.I`s */
.Item.I {display: inline} /* may be children of `.List`s as well as `.List.I`s */

Second Suggestion: assign a different Object (not subclass) for each scenario, using the display: inline; mechanism as an interface:

.List {display: block;}
.Inlinelist {display: inline;} /* choose a more elegant classname */
.Item {display: block;}
.Inlineitem {display: inline;} /* choose a more elegant classname */
chharvey commented 9 years ago

Update:

Superclass .List is now obsolete: the former subclasses are now their own classes:

.Item still exists as a component of the above lists but has no initial class definition (that is, .Item by itself has no styles but within a type of list above it has styles)

Subclasses .Comma, .Mdash, and .Ndash are now subclasses of .Ilist

Added new interface, .endline, for comma/mdash/ndash-separated values, which creates the appearance of a line break (without adding any HTML elements) and removes the character at the end of the line

.Enum.LIP is now .Ilist.LIP

Closing issue, but creating new issue, #34 , for the next minor release.

chharvey commented 9 years ago

reopening issue. go back to old system of using .List as a superclass and the 3 types as subclasses. Though .List is nothing special, and probably won't be instantiated by any Elements, leave it as a superclass for these reasons:

That all being said, leave .Ilist as is: even though it's still technically a list of sorts, it is not to be displayed like a .List Object.

chharvey commented 9 years ago

update: disregard previous comment.

.list-block will still be used, not as a mixin, but with the &:extend() mechanism. Thus the Objects .Olist, .Ulist, .Alist, .Footnotes, etc., can &:extend(.list-block) in Less without needing the classname in HTML.