We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实现以下与 web 相同的文本效果:
Web
Kraken
测试代码
// test file: /Users/andycall/work/kraken/tests/integration/specs/css/css-position/position-absolute.ts // it: in-inline-002 let BODY = document.body; BODY.style.margin = '0px'; let split; let containerSpan; let outerSpan; outerSpan = create( 'span', { 'box-sizing': 'border-box', }, [ createText(`outer span`), (containerSpan = create( 'span', { position: 'relative', border: '1px solid gray', 'box-sizing': 'border-box', }, [ createText(`container span start`), (split = create('div', { width: '10px', height: '10px', 'box-sizing': 'border-box', })), createText(`container span end`), ] )), createText(`outer span end`), ] ); BODY.appendChild(outerSpan); /** * Kraken cli compact library. used to preview kraken rendering. */ function setStyle(dom, object) { if (object == null) return; for (let key in object) { if (object.hasOwnProperty(key)) { dom.style[key] = object[key]; } } } function setAttributes(dom, object) { for (const key in object) { if (object.hasOwnProperty(key)) { dom.setAttribute(key, object[key]); } } } function sleep(second) { return new Promise(done => setTimeout(done, second * 1000)); } function create(tag, style, child) { const el = document.createElement(tag); setStyle(el, style); if (Array.isArray(child)) { child.forEach(c => el.appendChild(c)); } else if (child) { el.appendChild(child); } return el; } function createText(content) { return document.createTextNode(content); } function append(parent, child) { parent.appendChild(child); } async function matchScreenshot() { return new Promise((resolve) => { requestAnimationFrame(() => { resolve(); }); }); } async function matchElementImageSnapshot(element) { return Promise.resolve(); } async function it(name, fn) { console.log('starting ' + name); if (fn.length > 0) { const timer = setTimeout(() => { throw new Error('it execute timeout of 5000ms'); }, 5000); const done = () => { console.log('done call'); clearTimeout(timer); }; fn(done); } else { fn(); } } function xit(name, fn) { it(name, fn); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
实现以下与 web 相同的文本效果:
Web
Kraken
测试代码
The text was updated successfully, but these errors were encountered: