英文:
How to change font size in an Amplify list component?
问题
I'm using Figma-built components in Amplify. The components here are card collections. What I want to do is change the font size for a particular field in one collection of cards. Here is what a close inspection of the page looks like (see below).
The highlighted section is the area I want to change.
I tried this construct in my css file (below), but it has no effect.
.styled-text .amplify-flex .amplify-collection .amplify-collection-items .amplify-text {
font-size: 44px;
}
The way I am using .styled-text
is as follows (below).
<KatsuKappoCardioCardCollection className="styled-text"/>
What am I doing wrong?
英文:
I'm using Figma-built components in Amplify. The components here are card collections. What I want to do is change the font size for a particular field in one collection of cards. Here is what a close inspection of the page looks like (see below).
The highlighted section is the area I want to change.
I tried this construct in my css file (below), but it has no effect.
.styled-text .amplify-flex .amplify-collection .amplify-collection-items .amplify-text {
font-size: 44px;
}
The way I am using .styled-text
is as follows (below).
<KatsuKappoCardioCardCollection className="styled-text"/>
What am I doing wrong?
答案1
得分: 1
因为您正在使用Amplify Studio自动生成代码,最好的方法很可能是按照此处文档中的overrides
属性进行覆盖Amplify样式:
https://amplify.aws/learn/courses/Fullstack-for-Frontend-Developers-e7319/lessons/9
英文:
Since you're auto-generating the code with Amplify Studio, the best approach is most likely to override Amplify styles as documented here with the overrides
prop:
https://amplify.aws/learn/courses/Fullstack-for-Frontend-Developers-e7319/lessons/9
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论