Comments (8)
I have so far been unable to develop a CSS selector to target the first letter only when it is styled. However I suspect the easiest solution is to instead simply remove any such styling from the drop cap, so it is never italicized.
from homebrewery.
you can't style based on applied styles, unless they are set in inline styles:
.page .element[style*="color:red;"] {}
should work fine.
But that does not work for the ::first-letter
pseudo-selector.
A solution would be to fix this for manual cursive, but not for programatic one:
# This is a test
*T*his test will try to find a solution for the drop cap clip when you use cursive.
This one outputs an em
element inside the P, and can be styled easily. And somehow counts the T as first-letter, so it can be styled with .page h1+p:has(em)::first-letter
.
from homebrewery.
I was attempting to use something like .page h1+p:has(em:first-child)::first-letter
to target only first letters that were italicized, but it seems that the text elements inside a p
don't count as children, so ANY p
that contained an em
was targeted.
from homebrewery.
Is it easier to create a distinct font variant of that drop cap font, italic? Then could bake in better spacing. Rather than relying on browser to fake the italic.
from homebrewery.
I suspect that the easiest solution is simply to remove the italicization, with the primary justification that no drop cap in any official source book is italicized, and secondary justifications that the kerning between two different fonts is difficult to manage, even more so with additional text styling.
from homebrewery.
K. I also agree that italicizing the drop cap makes no sense. I don’t think we need to do anything here— just tell users not to include it in the italic syntax.
from homebrewery.
I could give a try to making an italicized version, but i agree there is no point in having that option.
If we are going to enforce the no-italics rule, we might as well force caps too, text-transform:uppercase
is a great piece of code.
from homebrewery.
I don’t think we should enforce anything. It’s easy enough to just not include the letter in the italics. If we have weird hidden rules it’s only going to confuse people who want to do something a little different, with different fonts or whatever.
from homebrewery.
Related Issues (20)
- Extend Markdown testing to include variable testing HOT 1
- Brew refused to save
- Saving Error HOT 1
- Reorder General Purpose Snippets from 5ePHB and.or 5eDMG to Blank theme HOT 1
- Emojis don't like to be hidden
- Server times out if trying to access `/account` while not logged in HOT 4
- "Helper/Guide" feature for snippets
- Markdown: Functions break if a variable name is a substring of the function names HOT 1
- Theme: Themes can select themselves as Theme Source HOT 4
- Math functions with multiple parameters cannot take variable names HOT 3
- Move GDrive/Database save location toggle to Properties Editor
- Brand New Issue
- ImageKit.io API integration
- Non-used URLs open bugged new page HOT 2
- Using scaleX or scaleY parameters causes skewing in rotated masks HOT 1
- Table of contents doesn't print accents in uppercase letters at the title HOT 5
- Ability to close search / replace bar HOT 10
- Title with shared link of a cloned brew in newpage shows up as error HOT 4
- White shear lines on masked images HOT 2
- images with alt-text with bad spaces get eaten
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrewery.