Hi everyone,
I need some help for a css snippet I made inspired by the palatinate theme by Eleanor Konik -palatinate/fancy-blockquote.css at main · eleanorkonik/-palatinate · GitHub
What I want to achieve is to have brackets for the citation, and the author outside of the brackets.
Problems :
1 - when I have 2 paragraphs, it puts brackets only on the first, and the Title & Author is not well displayed
2 - when I don’t have an author (a second paragraph) it doesn’t put the border
The rendering is in the picture attached.
First exemple is what I want. Second is with 2 paragraphs, Third is single paragraph.
I have searched some forums and mixed a lot of things. For my first problem, I think it comes from my “first-of-type” line, but without it, I don’t know how to put brackets on my paragraphs.
For the second, I have no idea where the problem comes from.
Here is my code :
`/* for editor */
.cm-quote {
color: var(–text-normal) !important;
}
/original ci-dessous/
/* for preview /
blockquote {
border: 2px solid;
border-color: #828282 !important;
border-left-width: 2px !important;
border-radius: 8px 8px 8px 8px;
font-size: 15px;
line-height: 1.5em;
margin: 10px 10px;
padding-top: 10px;
padding-bottom: 10x;
}
/ couleur obsidian : #8B6CEF */
blockquote {
position: relative;
}
/* In case of a quote without a source.*/
blockquote p:only-of-type:before {
font: 14px/20px italic Times, serif;
content: ““”;
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
}
blockquote p:only-of-type:after {
font: 14px/20px italic Times, serif;
content: “””;
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
}
/* Add quotation character before quote */
blockquote p:first-of-type:before {
font: 14px/20px italic Times, serif;
content: ““”;
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
}
blockquote p:first-of-type:after {
font: 14px/20px italic Times, serif;
content: “””;
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
}
/* a compléter */
blockquote p:last-of-type {
float: right;
font-style: italic
}
blockquote p { display: inline; }
/* mes essais
cite: {
font: 14px/20px italic Times, serif;
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
float:right
}
*/
// In case of a quote without a source.
blockquote p:only-of-type:before {
font: 14px/20px italic Times, serif;
content: ““”;
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
}
blockquote p:only-of-type:after {
font: 14px/20px italic Times, serif;
content: “””;
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
}
*/`
Any help would be great !