ex

[ASAP] Ruthenium(II) Complex Containing a Redox-Active Semiquinonate Ligand as a Potential Chemotherapeutic Agent: From Synthesis to <italic toggle="yes">In Vivo</italic> Studies

Journal of Medicinal Chemistry
DOI: 10.1021/acs.jmedchem.0c00431




ex

[ASAP] Exploration of the Structural Space in 4(3<italic toggle="yes">H</italic>)-Quinazolinone Antibacterials

Journal of Medicinal Chemistry
DOI: 10.1021/acs.jmedchem.0c00153




ex

[ASAP] Substituted Naphthalenediimide Compounds Bind Selectively to Two Human Quadruplex Structures with Parallel Topology

ACS Medicinal Chemistry Letters
DOI: 10.1021/acsmedchemlett.0c00041




ex

[ASAP] Exploring the Implication of DDX3X in DENV Infection: Discovery of the First-in-Class DDX3X Fluorescent Inhibitor

ACS Medicinal Chemistry Letters
DOI: 10.1021/acsmedchemlett.9b00681




ex

[ASAP] Substituted Azabicyclo[2.2.1]heptanes as Selective Orexin-1 Antagonists: Discovery of JNJ-54717793

ACS Medicinal Chemistry Letters
DOI: 10.1021/acsmedchemlett.0c00085




ex

Contextual styling with custom properties

Something I’ve been wanting for a long time, define different regions like a footer section, or side bar and not have to deal with all the contextual styling hassle. A.k.a. “Now that this button is used on a dark background, the button needs to change its colors too. Where should the styles live?”. Here an old post about struggling with contextual styling.

So then the other day I was doing some experiments with using custom properties for Atom’s UI. Turns out, using custom properties might make contextual styling a bit easier. For the rest of the post, let’s switch to a more simple example. A page where the main area is light, but then has a dark hero and footer section. Like this:

In the past, I probably would’ve created variations like Button--dark or overwrote it with header .Button {…}. Depends a bit on the project. Here another approach: Create themes with a set of variables, then apply the theme to the different areas.

1. Default theme

First let’s define our default theme with a bunch of variables.

[data-theme="default"] {
  --fg:         hsl(0,0%,25%);
  --border:     hsl(0,0%,75%);
  
  --bg:         hsl(0,0%,95%);
  --button-bg:  hsl(0,0%,99%);
  --input-bg:   hsl(0,0%,90%);
}

Then we create some components where we use the variables defined above.

[data-theme] {
  color: var(--fg);
  background-color: var(--bg);
}

.Button {
  color: var(--fg);
  border: 1px solid var(--border);
  background-color: var(--button-bg);
}

.Input {
  color: var(--fg);
  border: 1px solid var(--border);
  background-color: var(--input-bg);
}

And lastly we add the [data-theme="default"] attribute on the body so that our components will pick up the variables.

<body data-theme="default">

If you wonder why use data-theme attributes over classes? Well, no specific reason. Maybe with attributes, it’s a hint that only one theme should be used per element and is more separated from your other classes.

At this point we get this:

See the Pen Contextual styling with custom properties (1/3) by simurai (@simurai) on CodePen.

2. Dark theme

But our designer wants the hero and footer to be dark. Alright, let’s define another theme region.

[data-theme="dark"] {
  --fg:         hsl(0,10%,70%);
  --border:     hsl(0,10%,10%);
  
  --bg:         hsl(0,0%,20%);
  --button-bg:  hsl(0,0%,25%);
  --input-bg:   hsl(0,0%,15%);
}

And add the theme attribute to the header and footer.

<header data-theme="dark">
<footer data-theme="dark">

Which gives us this:

See the Pen Contextual styling with custom properties (2/3) by simurai (@simurai) on CodePen.

The reason why this works is that custom properties cascade and can be overridden on nested elements, just like normal properties.

3. Hero theme

A few months pass and our designer comes back with a redesigned hero section. “To make it look fresh” with a splash of color.

No problem! Just like with the dark theme, we define a new “hero” theme.

[data-theme="hero"] {
  --fg:         hsl(240,50%,90%);
  --border:     hsl(240,50%,10%);
  
  --bg:         hsl(240,33%,30%);
  --button-bg:  hsl(240,33%,40%);
  --input-bg:   hsl(240,33%,20%);
}
<header data-theme="hero">

And here is that fresh hero:

See the Pen Contextual styling with custom properties (3/3) by simurai (@simurai) on CodePen.

It’s also not limited to colors only, could be used for sizes, fonts or anything that makes sense to define as variables.

Benefits

Using these theme “regions” lets your components stay context un-aware and you can use them in multiple themes. Even on the same page.

  • Developers can add components, move components around, without having to know about in what context (theme) they live. The markup for the components stays the same.
  • Design systems authors can create new components without worrying about where they get used, the variables used in components stay the same.
  • Designers can define new theme regions, or change existing ones, without having to make changes to a component’s HTML or CSS, it stays the same.

Less time to talk about who, how and where, more time to talk about the weather. ☔️????

Concerns

Yeah, right. The big question: But does it scale? Can this be used for all use cases.

Ok, I’m pretty sure it doesn’t fit all situations. There are just too many to find a single solution for them all. And I’m actually not sure how well it scales. I guess it works great in these simple demos, but I have yet to find a larger project to test it on. So if you have used (or plan to use) this approach, I’m curious to know how it went.

A concern I can imagine is that the list of variables might grow quickly if themes have totally different characteristics. Like not just a bit darker or lighter backgrounds. Then you might need to have foreground and border colors for each component (or group of components) and can’t just use the general --fg and --border variables. Naming these variables is probably the hardest part.

Update I

@giuseppegurgone made an interesting comment:

in suitcss projects I used to define component level custom props, theme variables and then create themes by mapping the former to the latter suitcss-toolkit

So if I understood it correctly, by mapping theme variables to component variables, you could avoid your theme variables from growing too much and you can decide for each component how to use these theme variables.

Update II

If it’s too early to use custom properties in your project, @szalonna posted an example how to do something similar in SCSS.




ex

Huguette Caland / edited by Anne Barlow, Sara Matson and Giles Jackson ; texts by Anne Barlow, Brigitte Caland and Negar Azimi

Rotch Library - N6537.C329 A4 2019




ex

Mathias Goeritz: modernist art and architecture in Cold War Mexico / Jennifer Josten

Rotch Library - N6559.G64 J67 2018




ex

Anna Maria Maiolino, Entre pausas / texts by Anna Maria Maiolino, Tania Rivera and Randy Kennedy

Rotch Library - NC200.M27 A4 2018




ex

Djordje Ozbolt: regaining memory loss / exhibition curator, Nicoletta Lambertucci

Rotch Library - N6488.I8 V433 2019 Y8




ex

Heirloom / Larissa Sansour ; text by Nat Muller

Rotch Library - N6488.I8 V433 2019 D4




ex

Altered states: Substanzen in der zeitgenössischen Kunst = substances in contemporary art / herausgegeben von = edited by Milena Mercer ; Texte = texts, Max Daly ... [and thirteen others]

Rotch Library - N8251.S555 A48 2018




ex

Design by accident: for a new history of design / Alexandra Midal

Rotch Library - NK1175.M53 2019




ex

Touch me / Johannes Frandsen ; text, Mattias Lundblad

Rotch Library - TR650.F73 2018




ex

Albanian pavilion 2019: maybe the cosmos is not so extraordinary: Driant Zaneli

Rotch Library - N6488.I8 V433 2019 A38




ex

April in Paris: theatricality, modernism, and politics at the 1925 Art Deco Expo / Irena R. Makaryk

Hayden Library - N6493 1925.M35 2018




ex

Exercises in freedom: polnische Konzeptkunst, 1968-1981 = Polish conceptualism, 1968-1981 / Herausgeber = editor, Staatliche Kunstsammlungen Dresden, Kupferstich-Kabinett, Björn Egging

Rotch Library - N7255.P6 E88 2018




ex

Animal: exploring the zoological world / project editor, Lucy Kingett

Hayden Library - N7660.A653 2018




ex

Sergei Romanov / edited by Oksana Salamatina ; essay by Lyle Rexer

Rotch Library - TR655.R66 2018




ex

Conversation pieces: the world of Bruegel / Abdelkader Benali, Alexandra van Dongen, Katrien Lichtert, Sabine Pénot, Lucinda Timmermans ; translation, Patrick Lennon, Michael Lomax

Rotch Library - ND673.B73 B46 2018




ex

Ghana freedom: Ghana pavilion at the 58th International Art Exhibition La Biennale di Venezia

Rotch Library - N6488.I8 V433 2019 G4




ex

Mary Corse: a survey in light / Kim Conaty ; with contributions from Robin Clark, Michael Govan, Alexis Lowry, and David Reed

Rotch Library - N6537.C663 A4 2018




ex

My art guide: Venice 2019, 58th Biennale Arte: national participations, collateral events, exhibitions, events, museums, foundations, restaurants, hotels, city maps

Rotch Library - N6488.I8 V433 2019 A11




ex

Art beyond borders: artistic exchange in communist Europe (1945-1989) / edited by Jérôme Bazin, Pascal Dubourg Glatigny, and Piotr Piotrowski

Online Resource




ex

Expanded internet art: twenty-first century artistic practice and the informational milieu / Ceci Moss

Rotch Library - N7433.8.M67 2019




ex

Folk masters: a portrait of America / photographs by Tom Pich ; text by Barry Bergey

Rotch Library - TR681.A7 P53 2018




ex

Experimental Beijing: gender and globalization in Chinese contemporary art / Sasha Su-Ling Welland

Rotch Library - N7345.6.W46 2018




ex

Modernism on the Nile: art in Egypt between the Islamic and the contemporary / Alex Dika Seggerman

Rotch Library - N7381.7.S44 2019




ex

Where is adaptation?: mapping cultures, texts, and contexts / edited by Casie Hermansson, Janet Zepernick, Pittsburg State University

Hayden Library - NX161.W54 2018




ex

Afro-Mexican constructions of diaspora, gender, identity and nation / Paulette A. Ramsay

Hayden Library - PQ7081.7.B55 R36 2016




ex

Science fiction in Argentina: technologies of the text in a material multiverse / Joanna Page

Online Resource




ex

A history of Mexican literature / edited by Ignacio M. Sánchez Prado (Washington University in Saint Louis), Anna M. Nogar (University of New Mexico), José Ramón Ruisánchez Serra (University of Houston)

Hayden Library - PQ7111.H58 2016




ex

Selected works: a new translation, contexts, critical traditions / Sor Juana Inés de la Cruz ; translated by Edith Grossman ; edited by Anna More

Hayden Library - PQ7296.J6 A6 2016




ex

Nietzsche on his balcony: a novel / Carlos Fuentes ; translated from the Mexican Spanish by Ethan Shaskan Bumas and Alejandro Branger

Hayden Library - PQ7217.F793 F4313 2016




ex

Exemplary novels / Miguel de Cervantes ; translated from the Spanish by Edith Grossman ; edited by Roberto González Echevarría

Hayden Library - PQ6329.A6 G76 2016




ex

Escribir la infancia: narradoras mexicanas contemporáneas / Nora Pasternac, Ana Rosa Domenella, Luzelena Gutiérrez de Velasco, coordinadoras

Online Resource




ex

Inventores de tradición: ensayos sobre poesía mexicana moderna / Anthony Stanton

Online Resource




ex

Doscientos años de narrativa mexicana. Rafael Olea Franco, editor ; Pamela Vicenteño Bravo, colaboradora

Online Resource




ex

Doscientos años de narrativa mexicana. Rafael Olea Franco, editor ; Laura Angélica de la Torre, colaboradora

Online Resource




ex

Crítica textual: un enfoque multidisciplinario para la edición de textos / editores, Belem Clark de Lara [and others]

Online Resource




ex

Poetas del exilio español: una antología / edición de James Valender y Gabriel Rojo Leyva

Online Resource




ex

Kokoro: a Mexican woman in Japan / Araceli Tinajero ; translated by Daniel Shapiro

Hayden Library - PQ7081.46.T56 A313 2017




ex

Mujer y literatura mexicana y chicana: culturas en contacto / [Aralia López-González, Amelia Malagamba, Elena Urrutia, editores]

Online Resource




ex

Mujer y literatura mexicana y chicana: culturas en contacto: primer coloquio fronterizo, 22, 23 y 24 de abril de 1987.

Online Resource




ex

Las voces olvidadas: antología crítica de narradoras mexicanas nacidas en el siglo XIX / edición de Ana Rosa Domenella y Nora Pasternac

Online Resource




ex

Sin imágenes falsas, sin falsos espejos: narradoras mexicanas del siglo XX / Aralia López González, coordinadora

Online Resource




ex

La rojería: esbozos biográficos de comunistas mexicanos / Óscar de Pablo

Hayden Library - PQ7298.426.A254 R65 2018




ex

Oratorio para observador hombre exhausto y coro de astronautas: Oratorium für Beobachter erschöpften Menschen und Astronautenchor / Andrés Recasens Salvo ; Harald Wentzlaff-Eggebert (Hg.) ; übersetzt von Wera Zeller

Online Resource




ex

Tech Expo a Success!

Over 367 students attended yesterday's Tech Expo here in Library West. There were tables representing the Digital Library Center, Ask A Librarian, RefWorks, Mystery in the Stacks, library YouTube videos and games, Second Life, InfoCommons technology, course reserves and interlibrary loan, among others. Students also kept the librarians entertained by playing Guitar Hero.




ex

Textbook thieves at work

There were several reports of textbooks being stolen from students at MSL yesterday. We are asking staff to remind students not to leave their belongings unattended. Research Assistance student workers on the third floor will periodically roam looking for unattended belongings and leave the "I could have been a thief" notice to warn the student(s).

Suggestions?