No Styles apply
Closed this issue · 5 comments
- Package Version: 3.0.1
- Nova Version: 4~
- PHP Version: 8.2
Description:
html, blade, markdown syntax will not apply the style I gave it.
The Text are small and are not an H1 or # Headline.
Steps To Reproduce:
Installed nova and https://github.com/InteractionDesignFoundation
public function cards(NovaRequest $request)
{
return [
(new HtmlCard())->width('1/3')->markdown('# Optionaler Wert')->center(),
(new HtmlCard())->width('1/3')->html('<h1> Optionaler Wert </h1>')->center(),
];
}
Hi @erth5!
Version 3.1.0 should be available now, which allows you to chain the withBasicStyles()
option onto HtmlCard()
- if you do so, you'll get some basic styling applied. I hope that helps!
Hello @JasonTame
I can write ->withBasicStyles() to all functions, but nothing change.
The "withoutcardstyles" and "center" function works.
It seems can't apply code inside the card.
`
(new HtmlCard())->width('1/3')->view('cards.precision')->center()->withBasicStyles(),
(new HtmlCard())->width('1/3')->markdown('# Optionaler Wert')->center()->withBasicStyles(),
(new HtmlCard())->width('1/3')->html('<h1> Optionaler Wert </h1>')->center()->withBasicStyles(),
`
because of p Tag, the card has a line break. only font size not apply
<h1> Optionaler Wert </h1> <p> erge <p> > fe <vde
->
Optionaler Wert
erge
fe
# Optionaler Wert, ## dwq
->
Optionaler Wert, ## dwq
Can you reproduce the failure?
@erth5 Please double-check that you have updated to version 3.1.0, it looks like you are still using an older version of the package
by "composer update" The composer.json keep version 3.0 while composer.lock had 3.1.0
I installed it new as
"require": {
"interaction-design-foundation/nova-html-card": "^3.1",
composer.lock
"name": "interaction-design-foundation/nova-html-card",
"version": "3.1.0",
autocomplete recognizes ->withBasicStyles in:
(new HtmlCard())->width('1/3')->view('cards.precision')->center()->withBasicStyles(),
(new HtmlCard())->width('1/3')->markdown('# Optionaler Wert')->center()->withBasicStyles(),
(new HtmlCard())->width('1/3')->html("<h1> Optionaler Wert </h1>")->center()->withBasicStyles(),
but nothing change. The cards display unstyled text.
do you need any logs or config details?
I test it on a complete new environment and installed all extensions after this, and it works, so I think it's a tailwind or mix/vite problem. I hope i can restart this project anyway to solve this problem.