Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't apply blockquote attributes to paragraphs #130

Open
dheian opened this issue Dec 1, 2013 · 4 comments
Open

Don't apply blockquote attributes to paragraphs #130

dheian opened this issue Dec 1, 2013 · 4 comments

Comments

@dheian
Copy link

dheian commented Dec 1, 2013

I have a CSS class that puts a border on blockquotes. I've noticed that when I do a class in 3.5.4., the class gets put on the inner paragraph, thereby giving me a double border.

So..

bq(speech). Semper ubi sub ubi

Gives me:

<blockquote class="speech">
<p class="speech">Semper ubi sub ubi</p>
</blockquote>

Why is the class being added to the inner paragraph when it's just meant for the bq?

Is there a way to stop this or is this a bug? Thanks.

@gocom
Copy link
Member

gocom commented Dec 2, 2013

Its intentionally done in the code rather than being a bug. Textile will pass all attributes apart from cite and id to the paragraphs, since you will not have direct access to the paragraphs themselves. Altho, that is rather useless as you can't apply attributes to a single paragraph and you can as easily select the children by the parent.

Now, as you could select the children by the parent, you can also apply the border to the blockquote only. You can either overwrite:

.speech .speech {
   border: none;
}

Or select only parent most:

article > .speech, div > .speech {
    border: 1px solid #000;
}

Since attribute inheritance is pointless, and limiting as parsing goes, we'll going remove it, eventually. This is likely to happen in the next major/minor release (4.0.0 or 3.6.0), (but not sooner) as dropping this 'feature' alters generated structure semantically and thus breaks backwards compatibility.

@philwareham
Copy link
Member

You could also use this CSS rule to achieve the same thing:

blockquote.speech {
    border: 1px solid #000;
}

@dheian
Copy link
Author

dheian commented Dec 2, 2013

Right. In the midst of moving servers and upgrading things. Sometimes the caffeine-deprived mind doesn't think things through! :-)

@dheian dheian closed this as completed Dec 2, 2013
@gocom
Copy link
Member

gocom commented Dec 2, 2013

Opening this.

@gocom gocom reopened this Dec 2, 2013
@netcarver netcarver modified the milestones: 3.7.0, 3.6.0 Nov 17, 2016
@gocom gocom modified the milestones: 3.7.0, 4.0.0 Nov 17, 2018
@gocom gocom modified the milestones: 4.0.0, 5.0.0 Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants