JSFiddle - React, Tailwind, and code Playground

by enyojs

JavaScript

enyo.kind({
    name: "MySample",
    style:"display:table; width:100%;",
    components: [
        {style:"position:relative; border: 1px solid red; width:100%; display:table-cell;", components: [
            {style:"overflow:hidden; background:yellow; width:100%;", components: [
                {style:"position:absolute; top:0; left:0; width:100%; white-space:nowrap; text-overflow:ellipsis; overflow:hidden;", content:"super-loooooong fit"}
            ]}
        ]},
        {style:"border: 1px solid blue; display:table-cell; white-space:nowrap;", content:"non-fit"}
    ]
});

new MySample({fit:true}).write();