How to style checkbox and radio inputs in webkit

8/12/2011

I always tell people “it can’t be done without JavaScript.” Well, I was wrong. I thought up this little gem today:


input[type="checkbox"] {
position:relative;
margin:0;
padding:0;
width: 0;
height: 0;
cursor:pointer;
}
input[type="checkbox"]::after {
content: '';
display: block;
position: absolute;
top: -5px;
left: -5px;
width: 15px;
height: 15px;
font:15px/15px Georgia;
border:1px solid #aaa;
text-align:center;
}
input[type="checkbox"]:checked::after {
content: '\2713';
}

input[type="radio"] {
position:relative;
margin:0;
padding:0;
width: 0;
height: 0;
cursor:pointer;
}
input[type="radio"]::after {
content: '';
display: block;
position: absolute;
top: -5px;
left: -5px;
width: 15px;
height: 15px;
font:30px/12px Georgia;
border:1px solid #aaa;
border-radius:15px;
text-align:center;
}
input[type="radio"]:checked::after {
content: '\2022';
}

The technique can definitely be refined. And (sad face) it doesn’t work in Firefox or (supplies!) Internet Explorer. But if you’re in the mobile/pad world, you should be just fine. The problem elsewhere is that the ::after pseudo class gets no love for input elements because they cannot be classified as “containers,” which is just annoying. :p

No Comments

Before the End of the World

20/03/2011

Here’s a composition, inspired of the soundtrack to the Black Stallion. Enjoy.

No Comments

Father’s Day

20/06/2010

Today, as I was preparing a lesson for Elder’s Quorum, out in the foyer of our chapel, a young boy, maybe eight or nine was playing and came up to me. Very sweet. I asked his name. “Nick.” I know the father of the boy, and think highly of the family. They are your typical hard-boiled New Englanders, but also not so typical. The father is somehow single and is raising a large family of somewhere from four to six kids (one of the daughters is black, the others are white). Nick (who happens to be a little wall- or cross-eyed, a somehow endearing feature) is one of them. I’ve never had the nerve (yet) to ask the father where the mother might be, but I watch them closely out of love and interest, as the family are converts and he is doing his best to fit into this new world of our crazy church and raise his kids well.

So Nick was playing in the foyer. Such a sweet kid. He came up to me and started asking me a lot of questions. (Sound familiar?). “What’s that? A question mark? Why are you asking questions? You should make it a statement. [I was writing my lesson which he noticed.] Do you want to see me do a triple jump? Do you want to see me do that again? [He fails his second attempt.] Did you see me almost fly? Do you have any games on your phone?” And so forth. Very sweet kid. I let him play with my phone, and pulled him up beside me on the sofa, and thought to myself: I’m going to be a good Dad. I can be wild and courageous and good and kind and everything a father needs to be.

Nick was a gift to me today.

3 Comments

Logic!

19/04/2010

Perhaps an exacting form of vengeance upon Christians who insist that all Mormons are not, would be to insist that all Christians are Mormons.

(He chuckles to himself.)

(Really, though, no interest in trying to pick any fights.)

No Comments

Stack Overflow

17/04/2010

This post was prompted by a question raised over here.

I’ve been thinking about visual representations of machine language for some time now.  I had an idea pour itself into my brain, oh, nearly a year ago, that has been consuming my thoughts ever since.

We live in a world of ones and zeroes and complex machine processes.  All of these processes are simplified by heavy lifting engineers, designers, and developers, and are served up to you over this magical thing we call the Internet.  Twitter, Facebook, email, blogs, news outlets, search engines.  Most people use these tools on a daily basis but have fairly little to no experience or understanding with the processes behind the scenes.  Indeed, as the world marches rapidly on in this grand technological revolution, the magic seems ever more elusive, and so it will continue.  Talk of singularity exacerbates or exemplifies (I suppose depending on how you look at it) this idea of consummation, a grand unifying theory of intelligence and the universe.  (I would state that God is the singularity, but I’ll leave that for another post.)  Still, what we see as magic, is represented in our modern world usually and practically by ones and zeroes, machine code, language.

Unfortunately, most engineer/mathematician types are so tied to their own familiar mathematical/computational worlds, they often forget to consider other paradigms.

Artists, for example, are often conditioned to think of the world in a very fluid way, usually untethered by mathematical models. Much of what happens in art is archetypal or symbolic, and often doesn’t follow any seemingly conventional logical arrangement. There are, of course, very strong exceptions to this. Music, for instance, especially in its theory, often requires strong left brained processes and so forth. In truth, I would argue that even the most right brained activities are not devoid of left logic, but rather are more complex mathematical paradigms, like chaos theory is to the beauty of fractals. So the cross-over from left to right and back again is not necessarily a schism, but a symbiotic coupling. Humans, in other words, utilize both sides of the brain.

Lately I’ve been thinking about a more artful representational approach to math and machine language — even in a banal world of ones and zeroes. The world has been thinking about machine language in terms of familiar mathematical, numeric, and alphabetic conventions for a fairly long time now, and it’s not exactly easy to realign the cosmos. Yet in a way, it also happens naturally. Wikis, wysisygs, drafting tools, photo and sound editors, blogging tools, and so forth, all these tools do the heavy mathematical and machine code lifting behind the scenes to make for a more artful end experience for the user.

But we rarely think of doing the same lifting for coders themselves. To be sure, code is symbolic, by its very nature, lingual. But I think it is possible to turn the whole thing on its head, and adopt a visual approach. What this would look like is anyone’s guess, but in a way we see it everywhere as the whole world of machine learning is abstracted more and more over time. As machines become more and more complex and can do more and more sophisticated things, there is a basic necessity to abstract and simplify those very processes, for ease of use, design, architecture, development, and…you name it.

That all said, I do not believe machines will ever learn anything on their own without human input. But, as I suggested earlier, that is another debate, as to the character of religion, God, science, and the universe.

No Comments

Guilty Pleasures: Part I

23/03/2010

In an endeavor to not entirely resist *all* my cultural upbringing, today I begin the first in a five part series revealing some of the cheesy Mormon shiz I have secretly embraced over the years.

Enjoy at your own secret eating.

Part I: Stay With Me

It would probably embarrass me to confess how many times this particular song has brought solace to me, but let’s just say that being alone on a mission at times, as well as other times in life, sometimes I’ve just needed some good ol’ cheese. (Plus, you know, it’s actually not that bad a song.  I’ve often thought I might do a cover of it someday.)

2 Comments

Regarding that Long, Winding Road

29/12/2009

See, the thing about that song, despite Paul’s rant, it is much better due to the overly dramatic orchestration and choir.  Sure, I like the posthumously released, sparser version.  And Ray Charles really was meant to sing the song, but it is, in my opinion, a better song because of Spector’s vision.

‘Sides.

Were it not for such drama, we should never have known this wonder.

2 Comments

Love

26/12/2009

It is small, simple,
deep.

Everything moves in its way:
trees sway,
ice goes down,
the rising forest meets
the heather field.

There is much to say,
where mountains find her feet,
and skies meet chimneys,
as seasons pause.

This place is mercy,
it is abundant,
rich, like the fat cow,
planted in the pasture.

It is small, delicate,
but expanding to its root,
where its end should be found,
but breadth cannot.

Its hatred is unknown.
Waste, want, wishes,
all these are left behind,
sad, shriveled at the gate.

Then it is chosen,
it is wide,
unbounded,
unfettered,

Amid Mizpah and Jeshanah,
the stone of life,
the sacrifice,
both doing and undoing.
Akedah. Amen.

It is small, it is simple,
but found in all,
unknown and knowing,
it is chosen,

And choosing,
comes to majesty,
to grace, to song,
to brightness,
to countenance,

O deep and abiding love,
once reborn, anew,
followed in its course,
charted to its endless fount.

No Comments

Birth, Un-birth

20/12/2009

Each soul comes,
like rain from dearth, to
torrent,
one after another,
birth to birth, to
Cradle, bed, manger,
basket, box, crate,
hamper,
bassinet,
can,
earth.
Denied or accepted, each
infant in turn, comes
praising,
its maker, marked
by its birth, its
infinite worth, from
Mother, Father, God,
celebrated or cursed,
Each soul recreated, the
seed tendered, imparted
in pleasure and pain,
that remaking of making,
soft and cured,
broken and pure,
appreciated, or
sometimes hated,
spoiled.
Each babe comes,
as time advances, at
autumnal or vernal equinoxes,
in other seasons,
at common times,
and even holiday.
I stopped as Christmas approached,
to wonder over the birth of
the children,
and heard a million,
no, more,
children sleeping, living, dying,
laughing, crying –
some torn
from the flesh, and
wasted,
stilled,
consumed –
others wanted.
Each soul comes,
like snow,
to its bright day
and dark night, like
Jesus,
under a new star,
celebrated each year,
in awe or aspersion,
acrimony or adoration,
to live life to a
measure,
full, or interrupted
by those who live on.

No Comments

Christmas

20/12/2009
No Comments