Letting implementation complexity leak into the UI is a common antipattern.
ALL cycles can be detected by “keeping track of a dependency graph and using common cycle-detection algorithms”. Worst case scenario, we can just be very aggressive about what depends on what and it’s still better than rejecting entire features that are needed by thousands of authors daily on the grounds of “but if used nonsensically it could result in a cycle and then the world would explode!!!11”.
Potential cycles come up all the time with any reasonable styling mechanism that supports the kinds of constraints needed by real designs.
There’s something utterly perverse in thinking it’s an acceptable compromise to throw more work on the shoulders of the thousands (if not millions) of authors to prevent the handful of implementors from doing extra work.Lea Verou (1, 2)
Marat Tanalin on web-development and IT
Detailed personal impressions of the 23.8-inch IPS-based modern computer monitor Dell P2415Q with 4K Ultra HD (3840×2160) resolution.
Impressive clarity, full 60 Hz without MST, no PWM, barely noticeable crystal inversion, heavy Glow effect, and other specifics.
The useful Firefox extension Copy Link Name that allows to copy text of a link on a webpage to clipboard has stopped to work in Firefox 39 (Aurora / Developer Edition).
The official support email does not work, while website of the extension author is just a stub without ability to contact him. However it is possible to fix the extension easily by ourselves.
Sometimes, it is needed to apply styles to each group of
DDelements in a common container like
DIVis disallowed by the HTML specification:
DLis the only valid parent element of these elements.
The security issue is that browsers need to make the domain name portion of the URL clearly visible. I hope that the smart folks working on Chrome can figure out a way to do that without castrating the browser’s ability to easily share links.
It’s a classic case of:
- Something must be done!
- This (killing URLs) is something.
- Something has been done.
Technically, obfuscating the URL seems to solve the security issue. But technically, decapitation seems to solve a headache.Jeremy Keith
Internet Explorer 8 (IE8) web-browser does not support the
getElementsByClassName()DOM-method, but supports
querySelectorAll()that allows to achieve the same goal without using any JS libraries.
CSS Cascading and Inheritance Level 3 specification that has recently reached the CR (Candidate Recommendation) status contains two important new features.
unsetvalue allows to reset value of a CSS property.
- Shorthand property
allallows to set a value to all CSS properties supported by browser without need to list them explicitly.
Using both features in conjunction should allow to easily and gracefully reach the result currently reached via multiline “reset” stylesheets.
Gaps in sprites (+)
To speed up downloading small images like icons, they are often united into one image called sprite. This minimizes delays caused by waiting for server response for each of image files.
However using sprites is connected with some nuances. One of most common errors is placing images in sprite without gaps between them.
For nearly 15 years, I’ve called myself a web developer.
In those 15 years I’ve had job titles like Technical Architect, Project Manager, Lead Designer, and even Director of Technology. Underneath it all, though, I just built web sites. Ask me what I did and I’d tell you that I was a web developer.
Over a month ago, I took a new title: Product Manager.
I’m not coding anymore. And I’m feeling a little uneasy about it.
Why does this make me uneasy? Because I’ve always shared my experience as a web developer and I suddenly find myself wondering how long I can continue to do that.Jonathan Snook
Sometimes there is a need to style a link as a standard button. This is typically undesirable; however, if we have the task anyway, then it makes sense at least to do this properly.
People of Mozilla — company developing Firefox web-browser — on switching Opera to WebKit (Chromium) layout engine and dropping development of Opera’s own engine — Presto.
matches()in latest versions of the standard). It allows to determine if an element matches specified CSS selector. It is one of key features allowing to go without libraries like jQuery to bind live event-handlers conveniently.
Internet Explorer supports
msprefix) as of version 9 only. But what to do with IE8 which we are still forced to support in many cases? Fortunately, there is a compact solution that does not need any third-party libraries.
But if advanced features of jQuery are unneeded for a specific task or project, Sizzle can be used as a standalone library, resulting in 5-6-x faster loading compared with jQuery.
If you have the misfortune to work on a huge, poorly developed site where you will never have permission to refactor the templates and CSS according to common sense and best practices, you may have to rely on class names and avoid descendant selectors and ids.
But under almost any other circumstance, properly used ids with descendant selectors are preferable because more semantic and lighter in bandwidth.
As for descendant selectors, in a site not designed by 100 monkeys, it is safe to assume that elements within an id’d div or HTML5 element will be visually styled in ways that are compatible, and that those same elements may be styled differently within a differently id’d div or HTML5 element.
There is nothing wrong with id when it is used appropriately (semantically, structurally, sparingly). There is plenty wrong with the notion that class is always preferable to descendant selectors and semantic, structural ids.L. Jeffrey Zeldman
IE10 sends a “Do Not Track” signal to Web sites by default.
The Sixth IE10 Platform Preview
…thus making Do Not Track (DNT) request header in fact useless. Entire point of DNT is exactly that it is informed choice of user, and noway a default setting that most users do not know of at all.
Consequently, DNT will stop perform a function of informing website about intent of user, and web developers will almost certainly stop taking DNT into account.
From a learning perspective, a validator is like the pedantic teacher who loves their red pen: some of its feedback is quite useful, but the remainder is likely to confuse and intimidate a newcomer.
Atul Varma (Mozilla)
In Firefox 4, statusbar has started to show at the right instead of at the left of browser window if search bar is opened. (Statusbar is used, for example, to display URL address of a currently hovered link.)
As a result, statusbar is shown now at the left, now at the right, and fundamental usability rule has become violated: specific element of interface should always be placed on one and the same place.
Those annoyed by this Firefox bug can manually add following CSS rules to
chrome/userChrome.cssfile in Firefox profile directory or with Stylish extension to fix the issue.
A modern method to deny loading pages of your site into frame (
IFRAMEHTML-element) on another site is using of
X-Frame-OptionsHTTP-server response header.
The feature is supported by all modern browsers including IE8+.
HTML5 spec editor Ian Hickson has removed the
TIMEelement from the HTML5 spec. This element allowed to markup dates (e.g. article publication date) usably and intuitively and was one of a few really semantic new features of HTML5:
As a “replacement”, he offers new common
DATAelement intended to markup any abstract data and having much more cluttered syntax based on microdata.
Next step of Ian will probably be dropping all semantic elements (headers, paragraphs, lists, etc.) and their replacement to the great unified
On republication of materials from other sites, it’s a rule to specify clickable link to source.
Link to home page of source site is generally useless for user and makes sense only from the viewpoint of search engine optimization of source site.
On the contrary, full direct link to exact page containing source material itself is useful and usable for user.
Dynamic programming languages in general and PHP in particular allow specifying default values for parameters of functions and methods.
The values can be specified directly in parameter list, but then, to skip a parameter when calling function, programmer is forced to recall what is default value for skipped parameter, or open documentation for the specific function. This is not enough usable in practice, so we can act in a different way.
Formerly, to position a background image with an offset from right or bottom edge of an HTML element, we have been forced to embed empty space into the image itself since CSS had no native support for such feature.
Situation is changing thanks to CSS3 “Backgrounds and Borders” Module providing an updated syntax for
background-positionthat now allows specifying arbitrary offsets from right and/or bottom edges of element.
border-radius generator is author’s online tool to automatedly generate CSS-code for rounded corners of HTML-blocks via CSS3-properties of
- generating minimal sufficient CSS-code with identical radiuses taken into account;
- ability to specify radius for each corner separately from common radius for all corners;
- choosing exact set of needed vendor prefixes;
- disableable aligning of properties by colon;
- built-in workaround for issues related to rendering rounded corners.
In browsers other than Firefox, there are issues related to rendering elements that have
border-radius. But there is a workaround applicable in most cases.
Though IE7 formally supports both
:first-childCSS-selector and sibling combinator (
+), there is a limitation: if HTML code has a comment in place where browser expects to see an element according to CSS selector, IE7 will not apply styles to actual element located next to the comment.