[英]How to beautify CSS in WebStorm?
我想使用 WebStorm 美化/重新格式化 CSS 代码。
我有这个CSS 风格:
.container {
display : grid;
margin : 0 auto;
max-width : 90rem;
padding-top : 1rem;
}
.cols-2 {grid-template-columns : 50% 50%;}
.logo {font-size : 3rem;font-weight : 600;}
.slogan {font-size : 1.3rem; margin-top : 6px;}
.search {background-image : url("../images/search.svg");background-repeat : no-repeat;background-size : 35px;}
.content {min-height : 500px;}
我想用 WebStorm/IntelliJ 把它美化成这个CSS 样式:
.container {
display : grid;
margin : 0 auto;
max-width : 90rem;
padding-top : 1rem;
}
.cols-2 {
grid-template-columns : 50% 50%;
}
.logo {
font-size : 3rem;
font-weight : 600;
}
.slogan {
font-size : 1.3rem;
margin-top : 6px;
}
.search {
background-image : url("../images/search.svg");
background-repeat : no-repeat;
background-size : 35px;
}
.content {
min-height : 500px;
}
有什么方法可以使用标准设置来完成此操作,还是应该安装一些扩展?
您需要更改项目的编码风格(为项目的外观设置规则),然后重新格式化代码。
Jetbrain 网站上有关于如何执行此操作的教程。
例如:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.