On Mon, 21 Aug 2017, Karl Dahlke wrote:
So css attributes from <style> tags or from <link> css files now apply to the
objects as they should. It's cool.
See tests 164 and 165 in jsrt.
This is great! I tried it out last night a bit.
Still acid 0 is a long way away.
Yes, I went to acid 0. I think we are very close. 'last' and
'penultimate' did not used to have anything in them correctly, and now
they do. The assertion at the end that uses computedStyle would even work
if the property being retrieved happened to be one of the ones propagated
by our CSS code. qS("#instructions:last-child") returns zero elements.
It isn't picking up penultimate. But all of the earlier steps prior to
the last line are working.
One of the mysteries remaining is they set "white-space" = "pre-wrap" in the
style block, but then the test checks for .whiteSpace.
Now how when or why does white-space equate to whiteSpace? I don't get that.
Aha! I found something out about this. There is this DOM
implementation by Thatcher et al, called env.js. I used it a couple of
years ago with an edbrowse 3.3.1 before we started ours. I learned a lot
from using it. They have CSS-related code, and they have the following
internal routines:
var __toCamelCase__ = function(name) {
if (name) {
return name.replace(/\-(\w)/g, function(all, letter) {
return letter.toUpperCase();
});
}
return name;
};
var __toDashed__ = function(camelCaseName) {
if (camelCaseName) {
return camelCaseName.replace(/[A-Z]/g, function(all) {
return '-' + all.toLowerCase();
});
}
return camelCaseName;
};
So I conclude that formalized conversion of camel case to/from dashed CSS
is a thing. I think that may be the missing link or one of them.
Kevin
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev