Google 的 CSS 样式
在检查了谷歌上的一些元素后,我注意到它们的命名约定相当时髦,即。
.n-Wa-q-Dc, .n-xb .n-Wa-q-Dc:hover
这显然不是人类可读/可管理的。 Google 的 CSS 和类名很大程度上是由服务器端技术自动生成的吗?
我看不到有人自己维护这样的 CSS 文件。
对于如此庞大的系统(Google)来说,让任何人来管理CSS并让系统来处理它是否明智?
Having been inspecting a few elements on Google, i noticed that their naming conventions are fairly funky, ie.
.n-Wa-q-Dc, .n-xb .n-Wa-q-Dc:hover
This is clearly not readable/manageable by a human. Is it the opinion that Google's CSS and class names are largely auto generated by server side technology.
I cant see people maintaining such a CSS file myself.
Would it be advisable for such a large system (Google) to have any people managing the CSS and just to let the systems handle it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
他们应该有一个人类可读的版本(用于开发),并从中生成模糊版本(用于部署)。最有可能的是,在部署之前对脚本或样式表的名称执行搜索-替换(从使用人类可读的到混淆的)。
They should have a version that is human-readable (for development) and, from that, generate the obfuscated version (for deployment). Most likely, a search-n-replace is performed on the names of the scripts or stylesheets (from using human-readable to obfuscated ones) before deployment.
看起来他们可能通过压缩器运行 css 以减小 css 文件的大小。作为
It looks as though they probably ran their css through a minifier to reduce the size of the css file. As