free

Better conditional classnames for hack-free CSS

Applying conditional classnames to the html element is a popular way to help target specific versions of IE with CSS fixes. It was first described by Paul Irish and is a feature of the HTML5 Boilerplate. Despite all its benefits, there are still a couple of niggling issues. Here are some hacky variants that side-step those issues.

An article by Paul Irish, Conditional stylesheets vs CSS hacks? Answer: Neither!, first proposed that conditional comments be used on the opening html tag to help target legacy versions of IE with CSS fixes. Since its inclusion in the HTML5 Boilerplate project, contributors have further refined the technique.

However, there are still some niggling issues with the “classic” conditional comments approach, which Mathias Bynens summarized in a recent article on safe CSS hacks.

  1. The Compatibility View icon is displayed in IE8 and IE9 if you are not setting the X-UA-Compatible header in a server config.
  2. The character encoding declaration might not be fully contained within the first 1024 bytes of the HTML document if you need to include several attributes on each version of the opening html tag (e.g. Facebook xmlns junk).

You can read more about the related discussions in issue #286 and issue #378 at the HTML5 Boilerplate GitHub repository.

The “bubble up” conditional comments method

Although not necessarily recommended, it looks like both of these issues can be avoided with a bit of trickery. You can create an uncommented opening html tag upon which any shared attributes (so no class attribute) can be set. The conditional classes are then assigned in a second html tag that appears after the <meta http-equiv="X-UA-Compatible"> tag in the document. The classes will “bubble up” to the uncommented tag.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="X-UA-Compatible"
          content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <!--[if lt IE 7]><html class="no-js ie6"><![endif]-->
    <!--[if IE 7]><html class="no-js ie7"><![endif]-->
    <!--[if IE 8]><html class="no-js ie8"><![endif]-->
    <!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->

    <title>Document</title>
  </head>
  <body>
  </body>
</html>

Fork the Gist

The result is that IE8 and IE9 won’t ignore the <meta http-equiv="X-UA-Compatible"> tag, the Compatibility View icon will not be displayed, and the amount of repeated code is reduced. Obviously, including a second html tag in the head isn’t pretty or valid HTML.

If you’re using a server-side config to set the X-UA-Compatible header (instead of the meta tag), then you can still benefit from the DRYer nature of using two opening html tags and it isn’t necessary to include the conditional comments in the head of the document. However, you might still want to do so if you risk not containing the character encoding declaration within the first 1024 bytes of the document.

<!DOCTYPE html>
<html lang="en">
<!--[if lt IE 7]><html class="no-js ie6"><![endif]-->
<!--[if IE 7]><html class="no-js ie7"><![endif]-->
<!--[if IE 8]><html class="no-js ie8"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
  <head>
    <meta charset="utf-8">
    <title>Document</title>
  </head>
  <body>
  </body>
</html>

Fork the Gist

The “preemptive” conditional comments method

Another method to prevent the Compatibility View icon from showing was found by Julien Wajsberg. It relies on including a conditional comment before the DOCTYPE. Doing this seems to help IE recognise the <meta http-equiv="X-UA-Compatible"> tag. This method isn’t as DRY and doesn’t have the character encoding declaration as high up in the document, but it also doesn’t use 2 opening html elements.

<!--[if IE]><![endif]-->
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js ie6"><![endif]-->
<!--[if IE 7]><html class="no-js ie7"><![endif]-->
<!--[if IE 8]><html class="no-js ie8"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <title>Document</title>
  </head>
  <body>
  </body>
</html>

Fork the Gist

While it’s interesting to explore these possibilities, the “classic” method is still generally the most understandable. It doesn’t create invalid HTML, doesn’t risk throwing IE into quirks mode, and you won’t have a problem with the Compatibility View icon if you use a server-side config.

If you find any other approaches, or problems with those posted here, please leave a comment but also consider adding what you’ve found to the relevant issues in the HTML5 Boilerplate GitHub repository.

Thanks to Paul Irish for feedback and suggestions.




free

Transitioning to Agile [electronic resource] : understanding the business imperative for transforming enterprises / Rick Freedman

Freedman, Rick, author




free

Free speech in the digital age/ Edited By Susan J. Brison And Katharine Gelber

Dewey Library - K3254.F73 2019




free

Networked press freedom: creating infrastructures for a public right to hear / Mike Ananny

Dewey Library - K3255.A958 2018




free

Cyber rights: defending free speech in the digital age / Mike Godwin

Online Resource




free

Of privacy and power: the transatlantic struggle over freedom and security / Henry Farrell, Abraham L. Newman

Dewey Library - K3263.F37 2019




free

Religious freedom under scrutiny / Heiner Bielefeldt and Michael Wiener

Dewey Library - K3258.B54 2020




free

Free-floating electrocatalysts outperform tethered ones

Detaching particles from the electrode surface frees them from electrical fatigue




free

What is hand sanitizer, and does it keep your hands germ-free?

Useful when you don't have access to a sink and some soap, hand sanitizers have become a hot commodity in the face of COVID-19




free

US national labs offer royalty-free patent licenses

The nonexclusive licenses, available on more than 1,000 technologies, will expire at the end of 2020




free

Magnetic liquid frees microfluidics from friction

Conveyor-belt effect in the liquid speeds sensitive cell samples with less pressure




free

Google Inc makes Meet app free for all users

Earlier, the premium video conferencing app was available only for paid enterprise users of the GSuite. This is the first time that a product designed for enterprise use is being extended to individual users, Smita Hashim, Director, Product Management, Google Cloud told ET




free

Encyclopedia of cognitive behavior therapy [electronic resource] / Arthur Freeman, editor-in-chief ; editors, Stephanie H. Felgoise [and others]

New York : Springer, [2005]




free

No hiring freeze: Companies hunting top talent despite salary, job cuts

More than 200 director-level and above posts were available over the past week, according to Xpheno, a staffing firm that compiles data from job portals, LinkedIn and company sites.




free

Disorder-Free Localization

Online Resource




free

Disorder-Free Localization / by Adam Smith

Online Resource




free

[ASAP] Lyoprotectant Optimization for the Freeze-Drying of Receptor-Targeted Trojan Horse Liposomes for Plasmid DNA Delivery

Molecular Pharmaceutics
DOI: 10.1021/acs.molpharmaceut.0c00310




free

[ASAP] Laser-Induced Graphene Electrochemical Immunosensors for Rapid and Label-Free Monitoring of <italic toggle="yes">Salmonella enterica</italic> in Chicken Broth

ACS Sensors
DOI: 10.1021/acssensors.9b02345




free

[ASAP] Metal-Free Colorimetric Detection of Pyrophosphate Ions by Inhibitive Nanozymatic Carbon Dots

ACS Sensors
DOI: 10.1021/acssensors.9b02486




free

3 Free Cataloger's Desktop Training Webinars

You are subscribed to Cataloging Products and Services News for Library of Congress. This information has recently been updated, and is now available.

09/04/2014 10:48 AM EDT

Learn the basics of the new and enhanced user interface, to be introduced on September 10, 2014.




free

Philosophies of environmental education and democracy: Harris, Dewey, and Bateson on human freedoms in nature / Joseph Watras

Online Resource




free

Uncivil Rites: Palestine and the Limits of Academic Freedom / Steven Salaita

Hayden Library - LC72.2.S25 2015




free

Coronavirus | Chennai Corporation to install hands-free disinfection stations

Officials said the equipment will be installed in market areas, Amma canteens and public toilets.




free

Coronavirus | Uber offers free rides to frontline healthcare workers in Chennai

As part of the UberMedic service, the car aggregator has allotted ₹25 lakh for the purpose.




free

[ASAP] Three-Dimensional Porous Carbon Skeleton Synthesized by a Template-Free and No-Post-Activation Process Applied for High-Performance Lithium–Sulfur Batteries

ACS Sustainable Chemistry & Engineering
DOI: 10.1021/acssuschemeng.9b07502




free

[ASAP] Bioinspired Enzymatic Synthesis of Terpenoid-Based (Meth)acrylic Monomers: A Solvent-, Metal-, Amino-, and Halogen-Free Approach

ACS Sustainable Chemistry & Engineering
DOI: 10.1021/acssuschemeng.0c02307




free

In Freedom We're Born: Songs from the American Revolution

New lyrics set to familiar (or some not so familiar) English melodies, recorded using 18th-century instrumentation to recreate the ambience of a small tavern or public meeting place.




free

Addition of flavonols and polysaccharides as excipient ingredients into epicatechin rich green tea extract inhibited free radical formation and glucose uptake

Food Funct., 2020, 11,3105-3111
DOI: 10.1039/C9FO03020D, Paper
So-Hee Yoo, Yeong-Eun Lee, Jin-Oh Chung, Chan-Su Rha, Yong-Deog Hong, Mi-Young Park, Soon-Mi Shim
Results from the current study suggested that whole green tea components rich in flavonols and polysaccharides could be potential hypoglycemic excipient ingredients into green tea catechins by enhancing catechin absorption.
The content of this RSS Feed (c) The Royal Society of Chemistry




free

iOS 9 Available as a Free Update for iPhone, iPad, and iPod touch Users September 16

Apple announced that iOS 9 will be available on September 16 as a free update for iPhone, iPad, and iPod touch users. iOS 9 makes iOS devices more intelligent and proactive with powerful search and improved Siri features, all while protecting users’ privacy. The way you interact with iPad gets even better with iOS 9, thanks to new multitasking features that let users view and interact with two apps at once, side by side. “iOS 9 is packed with intelligence that makes every experience with iPhone and iPad even more powerful — Siri can do more than ever and new proactive assistance helps you get more done before you ask, all while protecting users’ privacy,” said Craig Federighi, Apple’s senior vice president of Software Engineering.




free

OS X El Capitan Available as Free Update Tomorrow

OS X El Capitan, the latest major release of the world’s most advanced desktop operating system, will be available Wednesday, September 30, as a free update for Mac users. El Capitan builds on the groundbreaking features and beautiful design of OS X Yosemite. “People love using their Macs, and one of the biggest reasons is the power and ease of use of OS X,” said Craig Federighi, Apple’s senior vice president of Software Engineering. “El Capitan refines the Mac experience and improves performance in a lot of little ways that make a very big difference. Feedback from our OS X beta program has been incredibly positive and we think customers are going to love their Macs even more with El Capitan.”




free

We want a PM who protects our freedom: Bezwada Wilson

Interview with 2016 Magsaysay award winner and National Convenor, Safai Karamchari Andolan




free

Kitchen hacks to keep your plants pest-free during the lockdown

Kitchen hacks to keep your plants pest-free during the lockdown




free

Lifetime Risk and Years Lived Free of Total Cardiovascular Disease

Interview with Donald M. Lloyd-Jones, MD, ScM, author of Lifetime Risk and Years Lived Free of Total Cardiovascular Disease




free

Factory freezer trawlers in the Commonwealth Small Pelagic Fishery / The Senate, Environment and Communications References Committee

Australia. Parliament. Senate. Environment and Communications References Committee




free

[ASAP] Crystal Structure, Magnetism, and Electronic Properties of a Rare-Earth-Free Ferromagnet: MnPt<sub>5</sub>As

Chemistry of Materials
DOI: 10.1021/acs.chemmater.0c00244




free

[ASAP] NMR-Enhanced Crystallography Aids Open Metal–Organic Framework Discovery Using Solvent-Free Accelerated Aging

Chemistry of Materials
DOI: 10.1021/acs.chemmater.0c00894




free

Nasser's blessed movement: Egypt's free officers and the July revolution / Joel Gordon ; with a new preface

Rotch Library - DT107.83.G67 2016




free

All the plagues of hell / Eric Flint, Dave Freer

Flint, Eric, author




free

[ASAP] Catalyst-Free Cyclization- and Curtius Rearrangement-Induced Functional Group Transformation: An Improved Synthetic Strategy of First-in-Class ATX Inhibitor Ziritaxestat (GLPG-1690)

Organic Process Research & Development
DOI: 10.1021/acs.oprd.9b00511




free

Metal free alkene hydrogenation by B-doped graphitic carbon nitride

Catal. Sci. Technol., 2020, Advance Article
DOI: 10.1039/D0CY00488J, Paper
Ashima Dogra, Ilaria Barlocco, Amritpal Singh, Ferenc Somodi, Alberto Villa, Neeraj Gupta
Metal free hydrogenation of styrene under mild conditions employing boron-doped carbon nitride catalysts is reported.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




free

Site-specific catalytic activities to facilitate solvent-free aerobic oxidation of cyclohexylamine to cyclohexanone oxime over highly efficient Nb-modified SBA-15 catalysts

Catal. Sci. Technol., 2020, Advance Article
DOI: 10.1039/D0CY00479K, Paper
Wei Ding, Haoyu Peng, Wenzhou Zhong, Liqiu Mao, Dulin Yin
The development of highly active and selective heterogeneous catalysts for efficient oxidation of cyclohexylamine to cyclohexanone oxime is a challenge associated with the highly sensitive nitrogen center of cyclohexylamine.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




free

Freedom Hospital / Hamid Sulaiman ; translated by Francesca Barrie

Barker Library - PN6790.S953 S85 2018




free

A biodegradable CO2-based polymeric antitumor nanodrug via a one-pot surfactant- and solvent-free miniemulsion preparation

Biomater. Sci., 2020, 8,2234-2244
DOI: 10.1039/C9BM01931F, Paper
Qiaojie Luo, Xiaojun Li, Ying Wang, Jianfang He, Qiao Zhang, Pengfei Ge, Xia Cai, Qiang Sun, Weipu Zhu, Zhiquan Shen, Xiaodong Li
A biodegradable CO2-based polymeric nanodrug is obtained via a surfactant- and solvent-free miniemulsion preparation, which can be concentrated at tumor site by EPR and releases the encapsulated drug through pH responsiveness.
The content of this RSS Feed (c) The Royal Society of Chemistry




free

NiSe2-anchored N, S-doped graphene/Ni foam as a free-standing bifunctional electrocatalyst for efficient water splitting

Nanoscale, 2020, 12,9866-9872
DOI: 10.1039/D0NR00879F, Paper
Jinhao Zhou, Zegao Wang, Dongxu Yang, Fei Qi, Xin Hao, Wanli Zhang, Yuanfu Chen
A strategy to synthesize free-standing electrocatalysts coupling active nanostructured NiSe2 with conductive S, N-doped 3D graphene foam (3DSNG) is presented and the hybrid delivers superior performances for the HER, OER and overall water splitting.
The content of this RSS Feed (c) The Royal Society of Chemistry




free

The Waltons were freedom-fighters




free

'Thegreat freeze' caused church to move




free

Potential economic effects of the proposed Dominican Republic-Central America free trade agreement (DR-CAFTA) on the state of Florida




free

Potential economic effects of the proposed Free Trade Area of the Americas (FTAA) on the state of Florida




free

The marriage record of Freer, Joseph M. and Sylous, Sarah F




free

The marriage record of Sweat, Leon M. and Freer, Mary