A textbook on ordinary differential equations / Shair Ahmad, Antonio Ambrosetti
Services marketing : text and cases / Steve Baron, Kim Harris, Toni Hilton
Full Text RSS Feeds
In the business world, you cannot fight and ignore the data away, as the interaction of data and how you analyze it is the primary driver for your business in gaining competitive business strategies.
Most successful companies have built their businesses around the use of data, and even if you have the techniques and the manpower skill set that will analyze your data trends, it does you no good as it eats up your production time.
complete article
Ping.It Brings Context to RSS Feeds
In May last year, we brought you news on Ping.it, a Web-based RSS reader that lets you create tailored feeds by keywords and popularity. At its most basic
complete article
Is Text Messaging Ruining Our Youth?
If you have noticed the apparent omnipresence of cell phones, as most of us surely have, it likely will not surprise you that about 86% of the worlds roughly seven billion people have access to a mobile phone, or that 80% of cell phone owners use their devices to send and receive text messages. You may also be unsurprised to learn that the vast majority of texts are sent by teenagers under eighteen, and that the average teen from this group sends over 3,300 texts each month.
Is Text Messaging Ruining our Youth?
Computational biology: a hypertextbook / Scott T. Kelley, Department of Biology, San Diego State University, San Diego, California, and Dennis Didulo, Becton, Dickinson and Company, San Diego, California
Social Life Cycle Assessment: Case Studies from the Textile and Energy Sectors / Subramanian Senthilkannan Muthu, editor
Event marketing in the context of higher education marketing and digital environments Florian Neus
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:
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:
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:
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.
Huguette Caland / edited by Anne Barlow, Sara Matson and Giles Jackson ; texts by Anne Barlow, Brigitte Caland and Negar Azimi
Anna Maria Maiolino, Entre pausas / texts by Anna Maria Maiolino, Tania Rivera and Randy Kennedy
Heirloom / Larissa Sansour ; text by Nat Muller
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]
Touch me / Johannes Frandsen ; text, Mattias Lundblad
Folk masters: a portrait of America / photographs by Tom Pich ; text by Barry Bergey
Where is adaptation?: mapping cultures, texts, and contexts / edited by Casie Hermansson, Janet Zepernick, Pittsburg State University
Science fiction in Argentina: technologies of the text in a material multiverse / Joanna Page
Selected works: a new translation, contexts, critical traditions / Sor Juana Inés de la Cruz ; translated by Edith Grossman ; edited by Anna More
Crítica textual: un enfoque multidisciplinario para la edición de textos / editores, Belem Clark de Lara [and others]
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?
Context: nature, impact, and role [electronic resource] : 5th International Conference on Conceptions of Library and Information Sciences, CoLIS 2005, Glasgow, UK, June 4-8, 2005 ; proceedings / Fabio Crestani, Ian Ruthven (eds.)
European Union contested: foreign policy in a new global context / Elisabeth Johansson-Nogués, Martijn C. Vlaskamp, Esther Barbé, editors
Reconciliation in global context: why it is needed and how it works / edited by Björn Krondorfer
(Post)colonial histories: trauma, memory and reconciliation in the context of the Angolan Civil War / Benedikt Jager, Steffi Hobuß (eds)
Science fiction cinema and 1950s Britain: recontextualising cultural anxiety / Matthew Jones
Cultivating extreme art cinema: text, paratext and home video culture / Simon Hobbs
Rébellion chez les crayons / de Drew Daywalt ; illustré par Oliver Jeffers ; [texte traduit de l'anglais par Élisabeth Duval]
Comment trouver un éléphant / texte de Kate Banks ; illustrations de Boris Kulikov ; [texte français de Sylvie Goyon]
Typography = Typographie = Typographie : when, who, how / edited by Friedrich Friedl, Nicolaus Ott, Bernard Stein; text Philipp Luidl
3ds Max projects : a detailed guide to modeling, texturing, rigging, animation and lighting
Dynamic identities : how to create a living brand / by Irene van Nes ; texts, Paul Hughes, Ghislaine van Drunen & Irene van Nes
Internet research ethics for the social age : new challenges, cases, and contexts / edited by Michael Zimmer and Katharina Kinder-Kurlanda
Logic and general theory of science: Lectures 1917/18 with supplementary texts from the First Version of 1910/11 / Edmund Husserl ; translated by Claire Ortiz Hill
Rare Books Revealed: Text Corrections in Printed Books
While working on the Patricia D. Klingenstein Library’s hidden collections cataloging project, I’ve found some examples of the different methods authors and printers used to fix small errors in a text after an item was printed. Shown below are a few examples of the corrections that were made directly to the page. In the first...
The post Rare Books Revealed: Text Corrections in Printed Books appeared first on New-York Historical Society.