Menu icon Foundation
Ink framework - styles added to empty <td>

Hi,

just a question about the inliner and base ink.css.

is there any benefit to the inliner adding all the styles into empty td cells? wouldn't a lot of it be redundant, thus bloating the code?

eg

td {
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
border-collapse: collapse !important;
}

could be :

td {
border-collapse: collapse !important;
}

td.copy
{
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}

that means empty cells dont get uneccessary hyphen inline styles added, and copy cells get defined with some text here

just a suggestion anyway

thanks
J

cssinliner

Hi,

just a question about the inliner and base ink.css.

is there any benefit to the inliner adding all the styles into empty td cells? wouldn't a lot of it be redundant, thus bloating the code?

eg

td {
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
border-collapse: collapse !important;
}

could be :

td {
border-collapse: collapse !important;
}

td.copy
{
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}

that means empty cells dont get uneccessary hyphen inline styles added, and copy cells get defined with some text here

just a suggestion anyway

thanks
J

Eric Morris over 5 years ago

Having the inliner try to decide at runtime which tags should have which styles applied seems like a bit of a nightmare (and an open invitation for tons of bugs), but you bring up a good point. We'll try to focus on scoping the general resets better in future releases so that it doesn't bloat the code as much.