无法在Chrome中编辑样式? [英] Impossible to edit styles in Chrome?

查看:263
本文介绍了无法在Chrome中编辑样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我已经实现了服务器端渲染并使用styled-components管理样式,因此我无法在Chrome开发工具中编辑样式. devtools中的样式变为斜体,并且没有复选框可以关闭/打开指定的样式.

Since I've implemented server side rendering and managing the styles with styled-components, Im unable to edit styles in Chrome Dev Tools. The styles in devtools become italic and theres no checkbox to turn off/on specified style.

它在Mozilla中正常运行.但是为什么不使用Chrome呢?任何想法为什么会发生?谢谢.

It works properly in Mozilla. But why not in Chrome? Any ideas why does it happen? Thanks.

注意:它发生在生产中.

Note: It happens in production.

推荐答案

我认为您可能会在生产中看到通过快速模式"注入的样式.这使用了Chrome DevTools当前仅在其中显示的特殊DOM API .只读容量.我们还没有使用退出方式来禁用此注入方法,但是考虑过.

I think you're probably seeing the styles injected via "speedy mode" in production. This uses a special DOM API that Chrome DevTools currently only shows in a read-only capacity. We haven't put in an escape hatch to disable this injection method yet, but it's being considered.

在开发模式下运行设置时,所有内容通常都应可以检查和编辑.

When running your setup in development mode everything should be normally inspectable and editable.

这篇关于无法在Chrome中编辑样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆