...
$.fn.annotateEdit = function(image, note) {
if (note) {
this.note = note;
} else {
var newNote = new Object();
newNote.id = "new";
this.note = newNote;
}
}
...
var mynote = this.note;
form.find(':radio').change(function() {
var vacancy = $(this).attr('value');
mynote.vacancy = vacancy;
});
...
Run Code Online (Sandbox Code Playgroud)
是否可以从change()处理程序访问"this.note"而无需定义"mynote"?
看到“layout-1c”之前的“...”了吗?Firefox 似乎定义了一些规则,规定何时折叠较长的元素属性。我想禁用这个。总是向我展示一切。如何?
编辑双击属性还不够好。它失去了包装并让你手动滚动大量内容。Firebug 从一开始就做所有事情,我希望内置检查器也有同样的行为。
我项目的上游Web组件主题实现为<custom-style>
元素链接
我想将我的文档级别替代实现为JS模块(例如,避免将其硬编码到应用程序index.html
或等效文件中),从表面上看这很简单:
import '@vaadin/vaadin-lumo-styles/color.js';
const $template = document.createElement('template');
$template.innerHTML = `
<custom-style>
<style>
html,
:host {
--lumo-primary-color: red;
}
</style>
</custom-style>`;
document.head.appendChild($template.content);
Run Code Online (Sandbox Code Playgroud)
题
文档中使用的某些Web组件也会通过导入原始主题import '@vaadin/vaadin-lumo-styles/color.js'
。
我希望我的替代项总是最后级联(没有!important
hack)。
以后是否有多个import '@vaadin/vaadin-lumo-styles/color.js';
调用有可能还原我的CSS自定义属性覆盖级联?
认为:
--lumo-primary-color: hsl(214, 90%, 52%);
--lumo-primary-color: red;
--lumo-primary-color: hsl(214, 90%, 52%);
)吗?ES6在多个位置导入文件,为什么文件一次加载?似乎没有暗示,但是我正在努力寻找任何明确说明某事的文档<custom-style>
。
也许https://github.com/Polymer/polymer/blob/v3.2.0/lib/elements/custom-style.js#L80是关键?
毛刺
https://glitch.com/edit/#!/roan-pizza?path=src/index.js似乎确认重复的导入似乎不会引起问题,但是为什么呢?是纯粹由于ES6模块负载缓存引起的,还是其他原因?
<custom-style>
浏览器检查器中的EDIT拖放元素肯定会对级联产生影响(颜色根据标记顺序更改),因此至少可以确定加载顺序很重要。
资源:
.foo { line-height: 150px; font-size: 24px; clear: both; }
Run Code Online (Sandbox Code Playgroud)
vim魔术在这里,可能是基于视觉选择的东西
结果:
.foo { clear: both; font-size: 24px; line-height: 150px; }
Run Code Online (Sandbox Code Playgroud)
你对vim魔术部分有什么建议?
来自man git-clone:
<directory>
The name of a new directory to clone into. The "humanish" part of the source repository
is used if no directory is explicitly given (repo for /path/to/repo.git and foo for
host.xz:foo/.git). Cloning into an existing directory is only allowed if the directory is
empty.
Run Code Online (Sandbox Code Playgroud)
我想让我的git-clone默认显示名为"project.git"的非人性文件夹.怎么样?
编辑:应该已经指定了--bare repo不是这里的克隆目标.
javascript ×2
css ×1
es6-modules ×1
firefox ×1
git ×1
jquery ×1
polymer ×1
sorting ×1
vaadin ×1
vim ×1