How to make the title in the list smaller than the real title?
Now they’re both the same size
You could try using CSS to target the heading only inside the callout. Something like that …
.callout-content h1 {
font-size: /* Your desired value */
}
Maybe you’ll need to use !important
. Hope it helps you to play further.
Cheers, Marko
Thanks for your help, just what I want to find is the size control of H1~H6 in the list
Now that the size of the in-list and the real title is uniform, I want the in-list to be smaller
Title 1 is bigger
Currently on the phone, so from top of my head …
.callout-content li h1 {
font-size: /* Your desired value */;
}
… this should work for a headings in the list (in the callout ).
Cheers, Marko
I’ll move this to Custom CSS & Theme Design at this point.
I think @charleslu is asking about the heading size within regular unordered lists, and nothing to do with callouts here.
@ariehen knows that English is not my strongest skill … thx for pointing it out!
@charleslu, in that case, you have those options.
.cm-header-1.cm-list-1 {
font-size: /* Your desired value */;
}
This one will pick up (only) H1 in the list. If you want to get H2, change it to .cm-header-2
.
This one …
[class*="cm-header-"][class*="cm-list-"] {
/* common styles for all heading-list items */
}
… it will get all headers in the list. So, it is probably useless for you as you want separate sizes for different headers.
And additional info. You can use predefined values, like this font-size: var(--h1-size);
So if you would put in your CSS like this:
.cm-header-1.cm-list-1 {
font-size: var(--h2-size);
}
It means that H1 in the list would be the size of H2, so one is smaller than the original H1. You can do this for all H; just at the end, you’ll be limited to H5 == H6, as there are only six levels. From a visual perspective, you’ll probably need to play with other values, too.
font-variant: var(--h1-variant);
line-height: var(--h1-line-height);
font-size: var(--h1-size);
color: var(--h1-color);
font-style: var(--h1-style);
font-family: var(--h1-font);
These are just a few (or maybe all; I copy them from inspector) that you can see which are default values … in this case, for H1.
Cheers, Marko
EDIT
I remember this … Headings - Developer Documentation … where you can see predefined variables.
Thank you. I really appreciate it
I hope you continue to have good luck
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.