Obligatory "ignore this space" : https://sacoronavirus.co.za

The Ultimate Fairytale : A short history of Greece, Rome, Israel, England, France, and Germany.

Cascading stylesheets are quite wonderful; but for the problem of units! We have a viewport box, measured in pixels, and we have a document tree. The most natural unit for a document might seem to be the characters therein.

The reader owns the box, and its size is a secret to us: one would think that the reader aught to choose the size of the characters, would one not?

But this is the kind of thing that we (we) web developers turn to script for. We must let go of perfection, and try to get the job done.

We consider the name of a tag, and its class attribute: with these, we colour our tree; we will let go of the tag name, for the sake of demonstration.

In a tree one must always bear in mind one's path: it cannot be overstated that a path in a tree is a special kind of thing; there is only one route.

Eliminating some identifiers, we term this a descendent selector.

Making use of these, we are able to restrict our script to the assignment of the class attribute.

For example, let us have a button for three difference sizes of text. For future growth we will add a node, merely for the sake of this effect. <-- We include a comment merely to remind ourselves which node is which. -->

The identifiers we choose must be unique. As we inevitably include foreign stylesheets, we will give ourselves a prefix. We cannot guarantee that this prefix will be unique, but we are not perfect; this has been stated.

May I kindly request the prefix ktwkc?

The three sizes of text will be identified by ktwkc-a, ktwkc-b, and ktwkc-c.

We do not want the buttons themselves to change size; we will in fact make buttons which overlap our page.

The descendent selector will be most useful to us in this example in terms of specificity: we are not reconstructing our site, we are adding a feature.

The size of the button will have to be determined experimentally. We will borrow from another person's efforts, and thank them in our hearts.

In place of icons, we will do the obvious.

Knowing that such a thing has been done for the reader, it remains for them to decide how big they want their text.

We don't know what to do with the curious!

Related: Cookies.

Share. -2020 10 11