16/05/2017

# Posting without titles is immensely liberating. Not having to come up with something pithy to head up the piece every time you want to say something really takes the pressure off - you just get on with writing.

Of course, it's the career blogger's nightmare - those who keep reminding us that the title is the most important part of the piece, your one chance to capture the eyes of potential readers.

Some content will always need titles: microcast episodes, parts of a series, or more topical long form offerings. It is these that will form the bait, but the rest that will get people to subscribe or, just maybe, keep coming back to your site.

We don't think in titles, we think in ideas.

Sometimes they need announcing but, usually, the idea alone is enough.

: click to read or leave your ownComments

# I couldn't sleep for a while last night so what did I do? Started tweaking the CSS for the blog. We now have some colour! But there's only so much you can do on a phone. I need a native DOM inspector for the iPhone.

On comments and webmentions

In reply to: Depending on how they show up, I'll sometimes take webmentions which show up as "XXX mentioned this on YYY" and change the metadata in wp_comments...

There seems to be a lot of inconsistency in the way webmentions and microformats are handled or implemented between different platforms, especially Known and WordPress.

I've had to dive into the database on a number of occasions to add webmention as the comment type because it has not been detected properly.

While we can do this we certainly shouldn't have to.

: click to read or leave your ownComments

# CSS needs full dependency selectors.

There, I've said it. Not that I'm the first and certainly won't be the last.

CSS should let you choose what to do with something based on what's inside it but this isn't possible. We can only style an element based on what contains it and not the other way around.

To introduce a bit of consistency with the look of the blog I needed to reduce the bottom margin of <p> tags that contained the "read more" link but there is nothing to distinguish these from any other <p> tag except what they contained.

As CSS does not provide a means to do this I needed another solution.

Step up jQuery which uses the .has selector allowing use to target an element if it has a conditional item within it.

Here is a quick jQuery function that apples the styling for the "shrink-p" class to a <p> tag if it contains a link with the "more-link" class:

<script>
  jQuery(function ($) {
    $( "p" ).has( "a.more-link" ).addClass( "shrink-p" );
  } );
</script>

: click to read or leave your ownComments

About
COLOPHON
Colin Walker Colin Walker colin@colinwalker.blog