CSS selectors #46

Open
SleeplessByte opened this Issue Jan 31, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Collaborator

SleeplessByte commented Jan 31, 2013

Since the shortcode is allowed more than one time, you shouldn't use schema as id for the block element. I propose removing the id (perferably set it as an attribute) and adding schema as class.

[schema id="someid" ...]

will then generate

<div id="someid" class="schema">...</div>

To make sure it does not break existing custom css add schema as default id so it becomes:

$attributes = array ( ...
    'id' => 'schema',
   .... );

If there is a single schema on a page (usual case) it will have the same generated HTML with an extra class. If someone deliberately adds a new schema with id it gets overridden.

norcross was assigned Feb 2, 2013

Contributor

norcross commented Feb 2, 2013

you're absolutely right. when building this, I hadn't really thought that people would use more than one on a post / page. this will be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment