co

[ASAP] Complete Regression of Carcinoma via Combined C-RAF and EGFR Targeted Therapy

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




co

[ASAP] Discovery of a Potent Dual Inhibitor of Wild-Type and Mutant Respiratory Syncytial Virus Fusion Proteins

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




co

[ASAP] Sigma Receptor Ligands Carrying a Nitric Oxide Donor Nitrate Moiety: Synthesis, In Silico, and Biological Evaluation

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




co

[ASAP] Characterization of Specific <italic toggle="yes">N</italic>-a-Acetyltransferase 50 (Naa50) Inhibitors Identified Using a DNA Encoded Library

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




co

[ASAP] Discovery of an Atropisomeric PI3Kß Selective Inhibitor through Optimization of the Hinge Binding Motif

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




co

[ASAP] Update to Our Reader, Reviewer, and Author Communities—April 2020

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




co

[ASAP] Discovery of CPI-1612: A Potent, Selective, and Orally Bioavailable EP300/CBP Histone Acetyltransferase Inhibitor

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




co

[ASAP] PROTAC Compounds Targeting a-Synuclein Protein for Treating Neurogenerative Disorders: Alzheimer’s and Parkinson’s Diseases

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




co

[ASAP] Development of Selective Steroid Inhibitors for the Glucose-6-phosphate Dehydrogenase from <italic toggle="yes">Trypanosoma cruzi</italic>

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




co

[ASAP] Discovery of RO7185876, a Highly Potent ?-Secretase Modulator (GSM) as a Potential Treatment for Alzheimer’s Disease

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




co

[ASAP] Ultra-High-Throughput Acoustic Droplet Ejection-Open Port Interface-Mass Spectrometry for Parallel Medicinal Chemistry

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




co

[ASAP] Discovery of Adamantane Carboxamides as Ebola Virus Cell Entry and Glycoprotein Inhibitors

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




co

[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




co

[ASAP] De-risking Drug Discovery of Intracellular Targeting Peptides: Screening Strategies to Eliminate False-Positive Hits

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




co

Germany Facing Mass Blackouts Because The Wind And Solar Won’t Cooperate

Germany’s energy network nearly broken down in January because of poor execution from wind turbines and sun based boards, as indicated by information from a noteworthy exchange union. Wind and sunlight based power plants failed to meet expectations in January, 2017, as a result of shady climate with almost no wind, setting the phase for …

The post Germany Facing Mass Blackouts Because The Wind And Solar Won’t Cooperate appeared first on LatestSolarNews.




co

Tanzania turns to solar power to increase electricity connectivity

As many as 60 percent of the Kenyan population now has access to electricity according to official data. But in neighbouring Tanzania, the penetration rate is less than half of that and sparsely populated rural communities are especially neglected.  

The post Tanzania turns to solar power to increase electricity connectivity appeared first on LatestSolarNews.




co

Construction has started on the largest solar project in Nepal

The reports say that the constructions of a 25MW largest solar PV project in Nepal has begun. The foundation stone was laid last week at Devighat in Nuwakot by Minister for Energy, Water Resources and Irrigation, Barsha Man Pun. The government plans to finish the construction of the project in a year. As stated by …

The post Construction has started on the largest solar project in Nepal appeared first on LatestSolarNews.




co

Nesting Components

Using CSS components is somewhat straightforward. We add the markup and give it the component’s class name and all is good. Where it gets trickier is when we try to nest components. And when they need to be tweaked based on the context. Where should the styles be defined? It’s a question I’ve been asking myself a few times and what this article is trying to explore.

Just to clarify before we start, with “CSS components”, I mean the small building blocks that get used to assemble a website or app. Like buttons, inputs, navs, headers etc. Some also call them modules or patterns. Also I’m using the SUIT naming convention in the examples below, but any other convention would be fine as well. And just a heads, there isn’t some awesome solution at the end that solves all the problems. It’s just me whining most of the time.

Ok, best is to go straight into it and look at an example. Let’s say we have a Header component where we would like to add a Button component inside.

<header class=“Header”>
  <button class=“Button”>Button</button>
</header>

Now because the Button is inside the Header, we want to make the Button a bit smaller than it would be on its own.

Here a few approaches how to do that:

Option 1 - Descendant selector

Maybe the most common way is to use a descendant selector to change the font-size whenever a Button is inside a Header.

.Header .Button {
  font-size: .75em;
}

This works great but the question is, where should this rule be added? We probably split our components into separate files, so is it in header.scss or in button.scss? In other words, should the Header know about what other components might get nested or should the Button know in what environment it will get placed?

But wait, the point of creating components is to separate them, make them modular. Each component should be kept isolated and shouldn’t know about other components. So we can make changes, rename or remove them without having to check if they might get used somewhere else.

Option 2 - Variations

Another way is to create variations. We add a .Button--small class that we can use whenever we would like the button to be smaller without having to worry about ancestors.

.Button--small {
  font-size: .75em;
}
<header class=“Header”>
  <button class=“Button Button--small>Button</button>
</header>

This works great too, but could get out of hand quickly. What do you do if at some point you want the font-size to be .9em? Create yet another variation? Button--justALittleSmaller. As the project keeps growing, the number of variations will too. We will start to loose sight where they actually get used and we’re not sure anymore if we can change a variation or if it will have side effects in some other place. We could create “contextual” variations like Button--header or Button--footer, but then we’re back at the beginning and could just as well use “descendant selectors”.

Same goes for using states. .Button.is-small should only be used if there is a change in state and not to fit a certain context.

Option 3 - Adopted Child

I can’t remember where I read about this approach but somehow it stuck with me. I also forgot how it was called. So for now I’ll just call it “Adopted Child”.

Let’s switch it around and look at it from the Header’s perspective. What would we do if we wouldn’t know what the components are called that might get nested? But we know that we want to make them a bit smaller. Well, we probably would create a generic .Header-item class and use it like this:

.Header-item {
  font-size: .75em;
}
<header class=“Header”>
  <div class=“Header-item”></div>
</header>

Ok, that gets us a bit closer. Now, it’s probably strange saying it like that when talking about CSS, but what would we do if we don’t want to create an own child, but still have one. Right, we could adopt one. In our example we adopt a Button component as our own child. We didn’t create it, but now we can tweak.. erm.. I mean “raise” it like it’s our own:

// born in button.scss
.Button {
  font-size: 1em;
}

// raised in header.css
.Header .Header-item {
  font-size: .75em;
}
<header class=“Header”>
  <button class=“Header-item Button>Button</button>
</header>

It is a bit uncommon that the same HTML element shares classes from two different components. And it’s not without any risks. More about them later. But I really like this approach because it keeps the components independent without having to know about each other.

Another nice thing is that if we want to add other components to the Header that also need the same adjustments, we can reuse the same Header-item class, like for example on a text Input.

<header class=“Header”>
	<input class=“Header-item Input>
  <button class=“Header-item Button>Button</button>
</header>

Ok, about those risks. Well, depending on what properties we wanna change, it might not always be ideal. For example, because the Button already had font-size defined, we had to increase specificity by using .Header .Header-item. But that would also override variations like .Button--small. That might be how we want it, but there are also situations where we’d like the variation to always be “stronger”. An example would be when changing colors. When the color of Buttons should be different inside a Header, but not when its a variation, like .Button—primary. Yeah, we could take a look inside button.scss or our style-guide, but remember our goal.. we actually don’t want to make decisions by looking how other components are made.

So, as a general rule, don’t use “adopted children” for any properties that are theme related and only where you can be sure that you want to override them all the time. Like for layout/size related properties or adjusting the position.

More options?

There are some more ways to do contextual styling that came to mind. I’ll just mention them briefly for completeness, but think the 3 above are better suited.

Option 4 - We could use a preprocessor to extend an existing component. In our example it would be a clone of the Button with some tweaks added and used as a new child component .Header-button. Now we only rely that the Button exists in the source, but don’t have to worry about other contexts. Downside is inflating our CSS output. As well as having to remember lots of new child component classes.

Option 5 - We could create a utility class like .u-small. It’s similar to variations, but not scoped to a single component and could be used for other components as well. And for that reason it becomes very risky to ever change later.

Option 6 - And of course, we could use inline styles. But I would leave that to JavaScript only.


So after all that, which is best? I’m afraid there isn’t a clear winner. It would be nice to keep it consistent with a single approach throughout the entire project, but I guess we just have to decide on a per case basis:

  1. Descendant selectors if we can expect that components don’t change much. Like when using a UI Kit or library.
  2. Variations if it makes sense that a component has different versions that get reused anyways, and not just for a specific context.
  3. Adopted Child for layout, sizing, positioning or where we are sure to always want to override a property. Also for changing multiple child components at once.
  4. Extending when we truly want the components to be separated and don’t mind inflating the CSS output.
  5. Utilities for very specific things, that once the class is defined, it will never change, like clearing floats.
  6. Inline styles if it needs to be dynamically added with JavaScript.

As said at the beginning, I haven’t found a “fits all” solution and maybe the conclusion is: Try to keep contextual styling to a minimum.

Updates

The “Adopted Child” approach is called “Mixes” in BEM. Here some more infos.


SUIT also recommends using “Adopted Child/Mixes”. But also another option:

Option 7 - Adding a wrapper element. It’s the <div class="Excerpt-wrapButton"> in that example. I think it works great in most cases. But for example when using Flexbox, because it has this parent/child relationship, adding an extra wrapper in between would break it. And then you might still need to set the width of the wrapped component to 100% or so. Anyways, this is a great addition. Thanks Pablo in the comments.


Option 8 - Single Purpose Classes. It’s where every class has only a single property. It’s somewhere between utilities (Option 5) and inline styles (Option 6). Atomic CSS and Tachyons use this approach. I haven’t used them on a real project, but just from looking at it, the concerns are similar to the ones from utilities. If you want to change the value in a SP class, it seems unpredictable. Because in another place (where that same class is used), you might want to keep the current value. So you would have to first check if the change has any unwanted effects somewhere else.




co

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.




co

Thanks to Covid-19, Website Accessibility Has Never Been More Important

The first global pandemic of the digital era is upon us. We’re living in unprecedented and uncomfortable times. For our senior citizens, these past several weeks have been particularly discomforting. According to the CDC, men and women over the age of 65 are significantly more likely to develop complications from COVID-19. As we seek to […]




co

The matter of photography in the Americas / Natalia Brizuela and Jodi Roberts ; with contributions by Lisa Blackmore, Amy Sara Carroll, Marianela D'Aprile, María Fernanda Domínguez, Heloisa Espada, Rachel Price, Diana Ruiz, Tatiane Santa Ro

Rotch Library - TR184.B75 2018




co

Design: the key concepts / D.J. Huppatz

Barker Library - NK1510.H87 2019




co

Library of light: encounters with artists and designers / Jo Joelson

Rotch Library - N8219.L5 J64 2019




co

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

Rotch Library - N6559.G64 J67 2018




co

Legacy of the masters: painting and calligraphy of the Islamic world from the Shavleyan family collection / Will Kwiatkowski ; with contributions by John Seyller

Rotch Library - N6260.K87 2019




co

Leonardo da Vinci: nature and architecture / edited by Constance Moffatt, Sara Taglialagamba

Rotch Library - N6923.L33 M64 2019




co

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

Rotch Library - N6488.I8 V433 2019 Y8




co

Inventing Boston: design, production, and consumption / Edward S. Cooke, Jr

Rotch Library - NK838.B67 C66 2019




co

Art for people's sake: artists and community in Black Chicago, 1965-1975 / Rebecca Zorach

Rotch Library - NX512.3.A35 Z67 2019




co

Failed images: photography and its counter-practices / Ernst van Alphen

Rotch Library - TR183.A47 2018




co

Fields of fungus and sunflowers / [edited and designed by Tammy Nguyen ; contributions by Lovely Umayam and Adriel Luis]

Rotch Library - N7433.35.U6 M37 no.6




co

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




co

Neuer Norden Zürich: ein Kunstprojekt im öffentlichen Raum, 9. Juni-2. September 2018 = New north Zurich: a public art project, 9th of June-2nd of September 2018 / herausgegeben von Christoph Doswald ; fotografiert von Pierluigi Macor ; Übe

Rotch Library - N6496.3.S9 Z876 2018




co

Fogo Island arts: what do we know? What do we have? What do we miss? What do we love? / Brigitte Oetker, Nicolaus Schafhausen (eds.)

Rotch Library - N6546.N6 F64 2019




co

Scott Vendes's Menice

Rotch Library - N6488.I8 V433 2019 B33




co

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

Rotch Library - N6488.I8 V433 2019 A38




co

Dorothy Iannone: a cookbook / Dorothy Iannone ; [edited by Clément Dirié]

Rotch Library - N6537.I26 A4 2018




co

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

Hayden Library - N6493 1925.M35 2018




co

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




co

The stronger we become: the South African pavilion / Dineo Seshee Bopape, Tracey Rose, Mawande Ka Zenzile ; curated by Nkule Mabaso, Nomusa Makhubu

Rotch Library - N6488.I8 V433 2019 S6




co

Unfinished conversations on the weight of absence: Belu-Simion Făinaru, Dan Mihălțianu, Miklós Onucsán / curator, Cristian Nae

Rotch Library - N6488.I8 V433 2019 R6




co

My dearest Aiyana / [contributors, Daniil Davydoff, Naima Green, and Tuan Andrew Nguyen ; edited by Tammy Nguen]

Rotch Library - N7433.35.U6 M37 no.7




co

Sunniness in painting: from Edward Hopper to David Hockney / Nicola Vitale

Rotch Library - ND1140.V58 2019




co

Padiglione Indonesiano all Biennale di Venezia 2019 / team artistico, Syagini Ratna Wulan, Handiwirman Saputra, artisti ; Asmudjo J. Irianto, Yacobus Ari Respati, curatore

Rotch Library - N6488.I8 V433 2019 I5




co

T.C. Cannon: at the edge of America / edited by Karen Kramer ; with contributions by heather ahtone, Sherwin Bitsui, Caitlin Cooper, Frank Buffalo Hyde, Trevor Fairbrother, Santee Frazier, Joy Harjo, Joan Naviyuk Kane, Karen Kramer, Deana McCloud, America

Rotch Library - NX512.C36 A4 2018




co

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




co

Photography reframed: new visions in contemporary photographic culture / edited by Ben Burbridge and Annebella Pollen

Rotch Library - TR185.P52 2018




co

Julian Charrière: second suns / edited by Nadim Samman

Rotch Library - N7153.C465 A4 2018




co

Animated encounters: transnational movements of Chinese animation, 1940s-1970s / Daisy Yan Du

Rotch Library - NC1766.C6 D8 2019




co

Discordo ergo sum: Renate Bertlmann / curator, Felicitas Thun-Hohenstein

Rotch Library - N6488.I8 V433 2019 A9