英文:
Ag-grid css styles not working in firefox
问题
我正在尝试在ag-grid中为特定列更改样式,可以使用cellStyle或cellClassRules属性。
css位于css文件中:
.align-content-to-end {
text-align: end;
.ag-input-field-input {
text-align: end;
}
}
在Chrome中,这可以正常工作。但在Firefox中,我遇到了以下问题(无效的属性名称)。
我的问题是什么?
英文:
I am trying to change style for spesific column in ag-grid using either cellStyle- or cellClassRules-property.
css is located in css-file:
.align-content-to-end {
text-align: end;
.ag-input-field-input {
text-align: end;
};
}
This works well in Chrome. In firefox I get following (Invalid property name)
What is my problem?
答案1
得分: 1
使用 text-align: right;
而不是 end
。
.align-content-to-end {
text-align: right;
.ag-input-field-input {
text-align: right;
}
}
还有,你在CSS中使用了SASS语法,这是行不通的!简单地改成这样:
.align-content-to-end {
text-align: right;
}
.ag-input-field-input {
text-align: right;
}
英文:
so use text-align: right;
instead of 'end'
.align-content-to-end {
text-align: right;
.ag-input-field-input {
text-align: right;
};
}
also you are using SASS syntax in CSS which will not work!
simply do this instead
.align-content-to-end {
text-align: right;
}
.ag-input-field-input {
text-align: right;
};
答案2
得分: 0
这不是有效的CSS。这是有效的SCSS或Sass语法,但你不能在普通的CSS中这样做。我不确定你想要做什么,但要么使用Sass或SCSS,要么按照其他人说的去做。
英文:
That's not valid CSS. That's valid SCSS or Sass syntax but you can't do that with normal CSS. I'm not sure what you're trying to do but either use Sass or SCSS or do what the other person said
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论