x Landscape patterns in a range of spatio-temporal scales Alexander V. Khoroshev, Kirill N. Dyakonov, editors By library.mit.edu Published On :: Sun, 3 May 2020 09:41:51 EDT Online Resource Full Article
x Mouthwatering food pix to lift your Friday mood By www.rediff.com Published On :: Fri, 17 Apr 2020 12:02:06 +0530 Hemantkumar Shivsharan is making the most of the lockdown with these tempting home cooked meals. Full Article
x PIX: What kids learned during the lockdown By www.rediff.com Published On :: Sun, 19 Apr 2020 10:10:54 +0530 Rediff readers sent us these pictures to show how their kids are making the most of the lockdown. Full Article
x PIX: Models dare to take #PillowChallenge! By www.rediff.com Published On :: Fri, 24 Apr 2020 12:53:37 +0530 See how your favourite models rocked the challenge. Full Article
x Lockdown pix: These kids want you to stay indoors! By www.rediff.com Published On :: Tue, 28 Apr 2020 17:01:06 +0530 Young Rediff readers share inspiring messages to raise awareness about COVID-19. Full Article
x Outstanding Scroll and Parallax CSS Effects By 1stwebdesigner.com Published On :: Mon, 12 Aug 2019 14:56:54 +0000 CSS effects can be a great way to add some visual interest to your website. A common web design mistake is making a website that’s too static. One little parallax animation can do wonders to make your design more interesting … Full Article Collections Web Design Animation CSS
x Fascinating CSS Grid Layout Examples and Tutorials By 1stwebdesigner.com Published On :: Wed, 20 Nov 2019 15:26:54 +0000 CSS Grid is one of the most powerful tools available to developers. The simple module allows you to create entire website layouts, responsive galleries, and other cool effects. With enough creativity, you can do a lot of interesting things using … Full Article Collections Web Design CSS Inspiration
x Role of molecular bend angle and biaxiality in the stabilization of the twist-bend nematic phase By feeds.rsc.org Published On :: Soft Matter, 2020, Advance ArticleDOI: 10.1039/D0SM00078G, CommunicationWojciech Tomczyk, Lech LongaWithin mean-field theory for V-shaped molecules, we have investigated how the alteration of a molecule's structural features influence the stabilization of modulated and non-modulated nematic phases.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 Full Article
x Hexatic phase in a model of active biological tissues By feeds.rsc.org Published On :: Soft Matter, 2020, 16,3914-3920DOI: 10.1039/D0SM00109K, PaperAnshuman Pasupalak, Li Yan-Wei, Ran Ni, Massimo Pica CiamarraEpithelial cell tissues undergo a solid–liquid transition, e.g. as the motility of the cells increases. We find an intermediate hexatic phase in between the solid and the liquid ones, and the transition to follow the KTHNY scenario.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Structural properties of contractile gels based on light-driven molecular motors: a small-angle neutron and X-ray study By feeds.rsc.org Published On :: Soft Matter, 2020, 16,4008-4023DOI: 10.1039/D0SM00031K, PaperGiacomo Mariani, Jean-Rémy Colard-Itté, Emilie Moulin, Nicolas Giuseppone, Eric BuhlerThe collective rotation of light-driven molecular motors actuates the structural changes and macroscopic contraction of the chemical gels.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Assessing the Extent of Structural and Dynamic Modulation of Membrane Lipids due to Pore Forming Toxins: Insights from Molecular Dynamics Simulations By feeds.rsc.org Published On :: Soft Matter, 2020, Accepted ManuscriptDOI: 10.1039/D0SM00086H, PaperVadhana Varadarajan, Rajat Desikan, Ganapathy AyappaInfections in many virulent bacterial strains are triggered by the release of pore forming toxins (PFTs), which form oligomeric transmembrane pore complexes on the target plasma membrane. The spatial extent...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Impact of wormlike micelles on nano and macroscopic structure of TEMPO-oxidized cellulose nanofibrils hydrogels By feeds.rsc.org Published On :: Soft Matter, 2020, Accepted ManuscriptDOI: 10.1039/D0SM00135J, Paper Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Marcelo A. da Silva, Vincenzo Calabrese, Julien Schmitt, Kazi M. Zakir Hossain, Saffron J Bryant, Najet Mahmoudi, Janet L Scott, Karen J EdlerIn this work, we investigated the effect of adding surfactant mixtures on the rheological properties of TEMPO-oxidized cellulose nanofibrils (OCNF) saline dispersions. Three surfactant mixtures were studied: cocamidopropyl betaine (CAPB)/sodium...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Mix and match—a versatile equilibrium approach for hybrid colloidal synthesis By feeds.rsc.org Published On :: Soft Matter, 2020, Advance ArticleDOI: 10.1039/D0SM00202J, CommunicationMatan Yah Ben Zion, Yaelin Caba, Ruojie Sha, Nadrian C. Seeman, Paul M. ChaikinWe outline a simple yet general equilibrium technique for a scalable, high-purity, hybrid-colloidal synthesis with controlled valency. The method is applicable for liquid and solid particles and to a range of particle interactions.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 Full Article
x Investigating the Role of Carbon Nanotubes (CNTs) in Piezoelectric Performance of PVDF/KNN based Flexible Electrospun Nanogenerator By feeds.rsc.org Published On :: Soft Matter, 2020, Accepted ManuscriptDOI: 10.1039/D0SM00438C, PaperSatyaranjan Bairagi, Wazed AliIn the present study, the effect of varying concentrations of carbon nanotube (CNT) on the piezoelectric performance of poly (vinylidene fluoride) (PVDF)/potassium sodium niobate (KNN) based electrospun nanocomposite has been...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x On the pressure dependence of the thermodynamical scaling exponent γ By feeds.rsc.org Published On :: Soft Matter, 2020, Advance ArticleDOI: 10.1039/D0SM00254B, PaperR. Casalini, T. C. RansomIn materials with a constant scaling parameter γS, the Isomorph γI is found to vary with pressure, demonstrating γS ≠ γI.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 Full Article
x Binary mixtures of active and passive particles on a sphere By feeds.rsc.org Published On :: Soft Matter, 2020, Advance ArticleDOI: 10.1039/D0SM00281J, CommunicationBao-quan Ai, Bu-yun Zhou, Xiao-miao ZhangAccording to the competition between rotational diffusion and polar alignment, we find three distinct phases: a mixed phase and two different demixed phases.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 Full Article
x Effects of Eigen and Actual Frequencies of Soft Elastic Surfaces on droplet Rebound from Stationary Flexible Feather Vanes By feeds.rsc.org Published On :: Soft Matter, 2020, Accepted ManuscriptDOI: 10.1039/D0SM00315H, PaperChengchun Zhang, Zhengyang Wu, Chun Shen, Yihua Zheng, LIANG YANG, Yan Liu, Luquan RenThe aim of this paper is to investigate the effect of eigenfrequency and the actual frequency of the elastic surface for the droplet rebound. The elastic surface used in this...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Experimental observation of boundary-driven oscillations in a reaction–diffusion–advection system By feeds.rsc.org Published On :: Soft Matter, 2020, 16,4243-4255DOI: 10.1039/C9SM02291K, Paper Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Torsten Eckstein, Estefania Vidal-Henriquez, Azam GholamiBoundary-driven oscillations are observed experimentally in a reaction-diffusion-advection system, namely in the signaling population of Dictyostelium discoideum cells.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Characterizing the fluid–matrix affinity in an organogel from the growth dynamics of oil stains on blotting paper By feeds.rsc.org Published On :: Soft Matter, 2020, 16,4200-4209DOI: 10.1039/C9SM01965K, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Qierui Zhang, Frieder Mugele, Piet M. Lugt, Dirk van den EndeFluid–matrix affinity in an organogel is characterized by capillarity-induced oil release using absorbing paper.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x The tripeptide GHG as an unexpected hydrogelator triggered by imidazole deprotonation By feeds.rsc.org Published On :: Soft Matter, 2020, 16,4110-4114DOI: 10.1039/D0SM00224K, CommunicationMorgan Hesser, Lavenia Thursch, Todd Lewis, David DiGuiseppi, Nicolas J. Alvarez, Reinhard Schweitzer-StennerThe tripeptide glycyl-histidyl-glycine (GHG) self-assembles into long, crystalline fibrils forming a strong hydrogel (G' ∼ 50 kPa) above a critical concentration of 40 mM upon the deprotonation of its imidazole group.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Vesicle adhesion in the electrostatic strong-coupling regime studied by time-resolved small-angle X-ray scattering By feeds.rsc.org Published On :: Soft Matter, 2020, 16,4142-4154DOI: 10.1039/D0SM00259C, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Karlo Komorowski, Jannis Schaeper, Michael Sztucki, Lewis Sharpnack, Gerrit Brehm, Sarah Köster, Tim SaldittWe have used time-resolved small-angle X-ray scattering (SAXS) to study the adhesion of lipid vesicles in the electrostatic strong-coupling regime induced by divalent ions.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Active noise experienced by a passive particle trapped in an active bath By feeds.rsc.org Published On :: Soft Matter, 2020, Advance ArticleDOI: 10.1039/D0SM00006J, PaperSimin Ye, Peng Liu, Fangfu Ye, Ke Chen, Mingcheng YangWe study the properties of active noise experienced by a passive particle harmonically trapped in an active bath. The active noise is shown to depend on the trap stiffness.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 Full Article
x Sustainable sorbitol-derived compounds for gelation of the full range of ethanol–water mixtures By feeds.rsc.org Published On :: Soft Matter, 2020, Advance ArticleDOI: 10.1039/D0SM00343C, PaperGlenieliz C. Dizon, George Atkinson, Stephen P. Argent, Lea T. Santu, David B. AmabilinoA combination of gelators prepared from sustainable sources combine in a synergic way to widen the scope for the compounds to immobilise liquids, as shown by imaging, diffraction and rheology measurements.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 Full Article
x Correlation of Hierarchical Structure and Rheological Behavior of Polypseudorotaxane Gel Composed of Pluronic and β-cyclodextrin By feeds.rsc.org Published On :: Soft Matter, 2020, Accepted ManuscriptDOI: 10.1039/D0SM00406E, Paperkuo-chih Shih, Chien-You Su, Shing-Yun Chang, Grethe V Jensen, Chi-Chung Hua, Mu-Ping Nieh, Hsi-Mei LaiWe have identified the hierarchical (primary, secondary, tertiary and quaternary) structures of a polypseudorotaxane (PPR) gel composed of Pluronic F108 and β-cyclodextrin system to be β-cyclodextrin crystalline, lamellar sheets, lamellar...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Single chain in mean field simulation of flexible and semiflexible polymers: Comparison with discrete chain self-consistent field theory By feeds.rsc.org Published On :: Soft Matter, 2020, Accepted ManuscriptDOI: 10.1039/D0SM00620C, PaperSo Jung Park, Jaeup KimSingle chain in mean field (SCMF) simulation is a theoretical framework performing Monte Carlo moves of explicit polymer chains under quasi-instantaneously updated external fields which were originally imported from the...The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
x Sand lorry owners seek exemption from quarterly tax payment By www.thehindu.com Published On :: Fri, 08 May 2020 21:42:35 +0530 Most lorries were not operated during the lockdown which resulted in loss, they say Full Article Tamil Nadu
x Tapping expertise — how T.N. is handling the crisis By www.thehindu.com Published On :: Fri, 08 May 2020 23:44:57 +0530 Multiple panels with senior bureaucrats constituted to address issues arising out of the pandemic Full Article Tamil Nadu
x Explain methodology for issuing e-passes: HC By www.thehindu.com Published On :: Sat, 09 May 2020 04:54:33 +0530 The Madras High Court on Friday called for a report from the State government explaining the methodology adopted by it for issuing e-passes for the tr Full Article Tamil Nadu
x [ASAP] Monochromatic X-ray Source Based on Scattering from a Magnetic Nanoundulator By dx.doi.org Published On :: Tue, 07 Apr 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.0c00121 Full Article
x [ASAP] Describing Meta-Atoms Using the Exact Higher-Order Polarizability Tensors By dx.doi.org Published On :: Tue, 07 Apr 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.9b01776 Full Article
x [ASAP] Plasmon-Mediated Coherent Superposition of Discrete Excitons under Strong Exciton–Plasmon Coupling in Few-Layer MoS<sub>2</sub> at Room Temperature By dx.doi.org Published On :: Fri, 10 Apr 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.0c00233 Full Article
x [ASAP] Modulation of the Visible Absorption and Reflection Profiles of ITO Nanocrystal Thin Films by Plasmon Excitation By dx.doi.org Published On :: Mon, 13 Apr 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.9b01825 Full Article
x [ASAP] Terahertz Spectroscopy of Gas Mixtures with Dual Quantum Cascade Laser Frequency Combs By dx.doi.org Published On :: Thu, 23 Apr 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.9b01758 Full Article
x [ASAP] Exciton-Polaritons with Magnetic and Electric Character in All-Dielectric Metasurfaces By dx.doi.org Published On :: Thu, 30 Apr 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.0c00063 Full Article
x [ASAP] Strain-Correlated Localized Exciton Energy in Atomically Thin Semiconductors By dx.doi.org Published On :: Mon, 04 May 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.0c00626 Full Article
x [ASAP] Line-Scan Hyperspectral Imaging Microscopy with Linear Unmixing for Automated Two-Dimensional Crystals Identification By dx.doi.org Published On :: Wed, 06 May 2020 04:00:00 GMT ACS PhotonicsDOI: 10.1021/acsphotonics.0c00050 Full Article
x Beautiful Scrolling Experiences – Without Libraries By feedproxy.google.com Published On :: Fri, 06 Dec 2019 12:00:00 +0000 Michelle Barker appears as one of a heavenly host, coming forth with scroll in hand to pronounce an end to janky scrolljacking! Unto us a new specification is born, in the city of TimBL, and its name shall be called Scroll Snap. Sponsor: Order any Standard paperback(s) and get a surprise gift card in the box for YOU. While supplies last, from your pals at A Book Apart! One area where the web has traditionally lagged behind native platforms is the perceived “slickness” of the app experience. In part, this perception comes from the way the UI responds to user interactions – including the act of scrolling through content. Faced with the limitations of the web platform, developers frequently reach for JavaScript libraries and frameworks to alter the experience of scrolling a web page – sometimes called “scroll-jacking” – not always a good thing if implemented without due consideration of the user experience. More libraries can also lead to page bloat, and drag down a site’s performance. But with the relatively new CSS Scroll Snap specification, we have the ability to control the scrolling behaviour of a web page (to a degree) using web standards – without resorting to heavy libraries. Let’s take a look at how. Scroll Snap A user can control the scroll position of a web page in a number of ways, such as using a mouse, touch gesture or arrow keys. In contrast to a linear scrolling experience, where the rate of scroll reflects the rate of the controller, the Scroll Snap specification enables a web page to snap to specific points as the user scrolls. For this, we need a fixed-height element to act as the scroll container, and the direct children of that element will determine the snap points. To demonstrate this, here is some example HTML, which consists of a <div> containing four <section> elements: <div class="scroll-container"> <section> <h2>Section 1</h2> </section> <section> <h2>Section 2</h2> </section> <section> <h2>Section 3</h2> </section> <section> <h2>Section 4</h2> </section> </div> Scroll snapping requires the presence of two main CSS properties: scroll-snap-type and scroll-snap-align. scroll-snap-type applies to the scroll container element, and takes two keyword values. It tells the browser: The direction to snap Whether snapping is mandatory scroll-snap-align is applied to the child elements – in this case our <section>s. We also need to set a fixed height on the scroll container, and set the relevant overflow property to scroll. .scroll-container { height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; } section { height: 100vh; scroll-snap-align: center; } In the above example, I’m setting the direction in the scroll-snap-type property to y to specify vertical snapping. The second value specifies that snapping is mandatory. This means that when the user stops scrolling their scroll position will always snap to the nearest snap point. The alternative value is proximity, which determines that the user’s scroll position will be snapped only if they stop scrolling in the proximity of a snap point. (It’s down to the browser to determine what it considers to be the proximity threshold.) If you have content of indeterminate length, which might feasibly be larger than the height of the scroll container (in this case 100vh), then using a value of mandatory can cause some content to be hidden above or below the visible area, so is not recommended. But if you know that your content will always fit within the viewport, then mandatory can produce a more consistent user experience. See the Pen Simple scroll-snap example by Michelle Barker (@michellebarker) on CodePen. In this example I’m setting both the scroll container and each of the sections to a height of 100vh, which affects the scroll experience of the entire web page. But scroll snapping can also be implemented on smaller components too. Setting scroll snapping on the x-axis (or inline axis) can produce something like a carousel effect. In this demo, you can scroll horizontally scroll through the sections: See the Pen Carousel-style scroll-snap example by Michelle Barker (@michellebarker) on CodePen. The Intersection Observer API By implementing the CSS above, our web page already has a more native-like feel to it. To improve upon this further we could add some scroll-based transitions and animations. We’ll need to employ a bit of Javascript for this, using the Intersection Observer API. This allows us to create an observer that watches for elements intersecting with the viewport, triggering a callback function when this occurs. It is more efficient than libraries that rely on continuously listening for scroll events. We can create an observer that watches for each of our scroll sections coming in and out of view: const sections = [...document.querySelectorAll('section')] const options = { rootMargin: '0px', threshold: 0.25 } const callback = (entries) => { entries.forEach((entry) => { if (entry.intersectionRatio >= 0.25) { target.classList.add("is-visible"); } else { target.classList.remove("is-visible"); } }) } const observer = new IntersectionObserver(callback, options) sections.forEach((section, index) => { observer.observe(section) }) In this example, a callback function is triggered whenever one of our sections intersects the container by 25% (using the threshold option). The callback adds a class of is-visible to the section if it is at least 25% in view when the intersection occurs (which will take effect when the element is coming into view), and removes it otherwise (when the element is moving out of view). Then we can add some CSS to transition in the content for each of those sections: section .content { opacity: 0: } section.is-visible .content { opacity: 1; transition: opacity 1000ms: } This demo shows it in action: See the Pen Scrolling with Intersection Observer by Michelle Barker (@michellebarker) on CodePen. You could, of course, implement some much more fancy transition and animation effects in CSS or JS! As an aside, it’s worth pointing out that, in practice, we shouldn’t be setting opacity: 0 as the default without considering the experience if JavaScript fails to load. In this case, the user would see no content at all! There are different ways to handle this: We could add a .no-js class to the body (which we remove on load with JS), and set default styles on it, or we could set the initial style (before transition) with JS instead of CSS. Position: sticky There’s one more CSS property that I think has the potential to aid the scroll experience, and that’s the position property. Unlike position: fixed, which locks the position of an element relative to the nearest relative ancestor and doesn’t change, position: sticky is more like a temporary lock. An element with a position value of sticky will become fixed only until it reaches the threshold of its parent, at which point it resumes relative positioning. By “sticking” some elements within scroll sections we can give the impression of them being tied to the action of scrolling between sections. It’s pretty cool that we can instruct an element to respond to it’s position within a container with CSS alone! Browser support and fallbacks The scroll-snap-type and scroll-snap-align properties are fairly well-supported. The former requires a prefix for Edge and IE, and older versions of Safari do not support axis values. In newer versions of Safari it works quite well. Intersection Observer similarly has a good level of support, with the exception of IE. By wrapping our scroll-related code in a feature query we can provide a regular scrolling experience as a fallback for users of older browsers, where accessing the content is most important. Browsers that do not support scroll-snap-type with an axis value would simply scroll as normal. @supports (scroll-snap-type: y mandatory) { .scroll-container { height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; } section { height: 100vh; scroll-snap-align: center; } } The above code would exclude MS Edge and IE, as they don’t support axis values. If you wanted to support them you could do so using a vendor prefix, and using @supports (scroll-snap-type: mandatory) instead. Putting it all together This demo combines all three of the effects discussed in this article. Summary Spending time on scroll-based styling might seem silly or frivolous to some. But I believe it’s an important part of positioning the web as a viable alternative to native applications, keeping it open and accessible. While these new CSS features don’t offer all of the control we might expect with a fully featured JS library, they have a major advantage: simplicity and reliability. By utilising web standards where possible, we can have the best of both worlds: Slick and eye-catching sites that satisfy clients’ expectations, with the added benefit of better performance for users. About the author Michelle is a Lead Front End Developer at Bristol web agency Atomic Smash, author of front-end blog CSS { In Real Life }, and a Mozilla Tech Speaker. She has written articles for CSS Tricks, Smashing Magazine, and Web Designer Magazine, to name a few. She enjoys experimenting with new CSS features and helping others learn about them. More articles by Michelle Full Article UX css
x It All Starts with a Humble <textarea> By feedproxy.google.com Published On :: Sun, 08 Dec 2019 12:00:00 +0000 Andy Bell rings out a fresh call in support of the timeless concept of progressive enhancement. What does it mean to build a modern JavaScript-focussed web experience that still works well if part of the stack isn’t supported or fails? Andy shows us how that might be done. Those that know me well know that I make a lot of side projects. I most definitely make too many, but there’s one really useful thing about making lots of side projects: it allows me to experiment in a low-risk setting. Side projects also allow me to accidentally create a context where I can demonstrate a really affective, long-running methodology for building on the web: progressive enhancement. That context is a little Progressive Web App that I’m tinkering with called Jotter. It’s incredibly simple, but under the hood, there’s a really solid experience built on top of a minimum viable experience which after reading this article, you’ll hopefully apply this methodology to your own work. What is a minimum viable experience? The key to progressive enhancement is distilling the user experience to its lowest possible technical solution and then building on it to improve the user experience. In the context of Jotter, that is a humble <textarea> element. That humble <textarea> is our minimum viable experience. Let me show you how it’s built up, progressively real quick. If you disable CSS and JavaScript, you get this: This result is great because I know that regardless of what happens, the user can do what they needed to do when the loaded Jotter in their browser: take some notes. That’s our minimum viable experience, completed with a few lines of code that work in every single browser—even very old browsers. Don’t you just love good ol’ HTML? Now it’s time to enhance that minimum viable experience, progressively. It’s a good idea to do that in smaller steps rather than just provide a 0% experience or a 100% experience, which is the approach that’s often favoured by JavaScript framework enthusiasts. I think that process is counter-intuitive to the web, though, so building up from a minimum viable experience is the optimal way to go, in my opinion. Understanding how a minimum viable experience works can be a bit tough, admittedly, so I like to use a the following diagram to explain the process: Let me break down this diagram for both folks who can and can’t see it. On the top row, there’s four stages of a broken-up car, starting with just a wheel, all the way up to a fully functioning car. The car enhances only in a way that it is still mostly useless until it gets to its final form when the person is finally happy. On the second row, instead of building a car, we start with a skateboard which immediately does the job of getting the person from point A to point B. This enhances to a Micro Scooter and then to a Push Bike. Its final form is a fancy looking Motor Scooter. I choose that instead of a car deliberately because generally, when you progressively enhance a project, it turns out to be way simpler and lighter than a project that was built without progressive enhancement in mind. Now that we know what a minimum viable experience is and how it works, let’s apply this methodology to Jotter! Add some CSS The first enhancement is CSS. Jotter has a very simple design, which is mostly a full height <textarea> with a little sidebar. A flexbox-based, auto-stacking layout, inspired by a layout called The Sidebar is used and we’re good to go. Based on the diagram from earlier, we can comfortably say we’re in Skateboard territory now. Add some JavaScript We’ve got styles now, so let’s enhance the experience again. A user can currently load up the site and take notes. If the CSS loads, it’ll be a more pleasant experience, but if they refresh their browser, they’re going to lose all of their work. We can fix that by adding some local storage into the mix. The functionality flow is pretty straightforward. As a user inputs content, the JavaScript listens to an input event and pushes the content of the <textarea> into localStorage. If we then set that localStorage data to populate the <textarea> on load, that user’s experience is suddenly enhanced because they can’t lose their work by accidentally refreshing. The JavaScript is incredibly light, too: const textArea = document.querySelector('textarea'); const storageKey = 'text'; const init = () => { textArea.value = localStorage.getItem(storageKey); textArea.addEventListener('input', () => { localStorage.setItem(storageKey, textArea.value); }); } init(); In around 13 lines of code (which you can see a working demo here), we’ve been able to enhance the user’s experience considerably, and if we think back to our diagram from earlier, we are very much in Micro Scooter territory now. Making it a PWA We’re in really good shape now, so let’s turn Jotter into a Motor Scooter and make this thing work offline as an installable Progressive Web App (PWA). Making a PWA is really achievable and Google have even produced a handy checklist to help you get going. You can also get guidance from a Lighthouse audit. For this little app, all we need is a manifest and a Service Worker to cache assets and serve them offline for us if needed. The Service Worker is actually pretty slim, so here it is in its entirety: const VERSION = '0.1.3'; const CACHE_KEYS = { MAIN: `main-${VERSION}` }; // URLS that we want to be cached when the worker is installed const PRE_CACHE_URLS = ['/', '/css/global.css', '/js/app.js', '/js/components/content.js']; /** * Takes an array of strings and puts them in a named cache store * * @param {String} cacheName * @param {Array} items=[] */ const addItemsToCache = function(cacheName, items = []) { caches.open(cacheName).then(cache => cache.addAll(items)); }; self.addEventListener('install', evt => { self.skipWaiting(); addItemsToCache(CACHE_KEYS.MAIN, PRE_CACHE_URLS); }); self.addEventListener('activate', evt => { // Look for any old caches that don't match our set and clear them out evt.waitUntil( caches .keys() .then(cacheNames => { return cacheNames.filter(item => !Object.values(CACHE_KEYS).includes(item)); }) .then(itemsToDelete => { return Promise.all( itemsToDelete.map(item => { return caches.delete(item); }) ); }) .then(() => self.clients.claim()) ); }); self.addEventListener('fetch', evt => { evt.respondWith( caches.match(evt.request).then(cachedResponse => { // Item found in cache so return if (cachedResponse) { return cachedResponse; } // Nothing found so load up the request from the network return caches.open(CACHE_KEYS.MAIN).then(cache => { return fetch(evt.request) .then(response => { // Put the new response in cache and return it return cache.put(evt.request, response.clone()).then(() => { return response; }); }) .catch(ex => { return; }); }); }) ); }); What the Service Worker does here is pre-cache our core assets that we define in PRE_CACHE_URLS. Then, for each fetch event which is called per request, it’ll try to fulfil the request from cache first. If it can’t do that, it’ll load the remote request for us. With this setup, we achieve two things: We get offline support because we stick our critical assets in cache immediately so they will be accessible offline Once those critical assets and any other requested assets are cached, the app will run faster by default Importantly now, because we have a manifest, some shortcut icons and a Service Worker that gives us offline support, we have a fully installable PWA! Wrapping up I hope with this simplified example you can see how approaching web design and development with a progressive enhancement approach, everyone gets an acceptable experience instead of those who are lucky enough to get every aspect of the page at the right time. Jotter is very much live and in the process of being enhanced further, which you can see on its little in-app roadmap, so go ahead and play around with it. Before you know it, it’ll be a car itself, but remember: it’ll always start as a humble little <textarea>. About the author Andy Bell is an independent designer and front-end developer who’s trying to make everyone’s experience on the web better with a focus on progressive enhancement and accessibility. More articles by Andy Full Article UX craft
x Flexible Captioned Slanted Images By feedproxy.google.com Published On :: Sat, 21 Dec 2019 12:00:00 +0000 Eric Meyer gift wraps the most awkwardly shaped of boxes using nothing but CSS, HTML and a little curl of ribbon. No matter how well you plan and how much paper you have at your disposal, sometimes you just need to slant the gift to the side. We have a lot of new layout tools at our disposal these days—flexbox is finally stable and interoperable, and Grid very much the same, with both technologies having well over 90% support coverage. In that light, we might think there’s no place for old tricks like negative margins, but I recently discovered otherwise. Over at An Event Apart, we’ve been updating some of our landing pages, and our designer thought it would be interesting to have slanted images of speakers at the tops of pages. The end result looks like this. The interesting part is the images. I wanted to set up a structure like the following, so that it will be easy to change speakers from time to time while preserving accessible content structures: <div id="page-top"> <ul class="monoliths"> <li> <a href="https://aneventapart.com/speakers/rachel-andrew"> <img src="/img/rachel-andrew.jpg" alt=""> <div> <strong>Rachel Andrew</strong> CSS Grid </div> </a> </li> <li> <a href="https://aneventapart.com/speakers/derek-featherstone"> <img src="/img/derek-featherstone.jpg" alt=""> <div> <strong>Derek Featherstone</strong> Accessibility </div> </a> </li> <li> … </li> <li> … </li> </ul> </div> The id value for the div is straightforward enough, and I called the ul element monoliths because it reminded me of the memorial monoliths at the entrance to EPCOT in Florida. I’m also taking advantage of the now-ubiquitous ability to wrap multiple elements, including block elements, in a hyperlink. That way I can shove the image and text structures in there, and make the entire image and text below it one link. Structure is easy, though. Can we make that layout fully responsive? I wondered. Yes we can. Here’s the target layout, stripped of the navbar and promo copy. So let’s start from the beginning. The div gets some color and text styling, and the monoliths list is set to flex. The images are in a single line, after all, and I want them to be flexible for responsive reasons, so flexbox is 100% the right tool for this particular job. #page-top { background: #000; color: #FFF; line-height: 1; } #page-top .monoliths { display: flex; padding-bottom: 1em; overflow: hidden; } I also figured, let’s give the images a simple basis for sizing, and set up the hyperlink while we’re at it. #page-top .monoliths li { width: 25%; } #page-top .monoliths a { color: inherit; text-decoration: inherit; display: block; padding: 1px; } So now the list items are 25% wide—I can say that because I know there will be four of them—and the links pick up the foreground color from their parent element. They’re also set to generate a block box. At this point, I could concentrate on the images. They need to be as wide as their parent element, but no wider, and also match height. While I was at it, I figured I’d create a little bit of space above and below the captioning text, and make the strong elements containing speakers’ names generate a block box. #page-top .monoliths img { display: block; height: 33rem; width: 100%; } #page-top .monoliths div { padding: 0.5em 0; } #page-top .monoliths strong { display: block; font-weight: 900; } It looks like the speakers were all cast into the Phantom Zone or something, so that needs to be fixed. I can’t physically crop the images to be the “correct” size, because there is no correct size: this needs to work across all screen widths. So rather than try to swap carefully-sized images in and out at various breakpoints, or complicate the structure with a wrapper element set to suppress overflow of resized images, I turned to object-fit. #page-top .monoliths img { display: block; height: 33rem; width: 100%; object-fit: cover; object-position: 50% 20%; } If you’ve never used object-fit, it’s a bit like background-size. You can use it to resize image content within the image’s element box without creating distortions. Here, I set the fit sizing to cover, which means all of the img element’s element box will be covered by image content. In this case, it’s like zooming in on the image content. I also set a zooming origin with object-position, figuring that 50% across and 20% down would be in the vicinity of a speaker’s face, given the way pictures of people are usually taken. This is fairly presentable as-is—a little basic, perhaps, but it would be fine to layer the navbar and promo copy back over it with Grid or whatever, and call it a day. But it’s too square and boxy. We must go further! To make that happen, I’m going to take out the third and fourth images temporarily, so we can see more clearly how the next part works. That will leave us with Rachel and Derek. The idea here is to clip the images to be slanted, and then pull them close to each other so they have just a little space between them. The first part is managed with clip-path, but we don’t want to pull the images together unless their shapes are being clipped. So we set up a feature query. @supports (clip-path: polygon(0 0)) or (-webkit-clip-path: polygon(0 0)) { #page-top .monoliths li { width: 37.5%; } } I decided to test for both the un-prefixed and WebKit-prefixed versions of clip-path because Safari still requires the prefix, and I couldn’t think of a good reason to penalize Safari’s users for the slowness of its standards advancement. Then I made the images wider, taking them from 25% to 37.5%, which makes them half again as wide. Thanks to object fitting, the images don’t distort when I change their parent’s width; they just get wider and scale up the contents to fit. And now, it is time for clipping! @supports (clip-path: polygon(0 0)) or (-webkit-clip-path: polygon(0 0)) { #page-top .monoliths li { width: 37.5%; -webkit-clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); } } Each coordinate pair in the polygon() is like the position pairs in background-position or object-position: the horizontal distance first, followed by the vertical distance. So the first point in the polygon is 25% 0, which is 25% of the way across the element box, and no distance down, so right at the top edge. 100% 0 is the top right corner. 75% 100% is on the bottom edge, three-quarters of the way across the element, and 0 100% is the bottom left corner. That creates a polygon that’s a strip three-quarters the full width of the element box, and runs from bottom left to top right. Now we just have to pull them together, and this is where old tricks come back into play: all we need is a negative right margin to bring them closer together. #page-top .monoliths li { width: 37.5%; margin-right: -7.5%; -webkit-clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); } The separation between them is a little wider than we were originally aiming for, but let’s see what happens when we add the other two images back in and let flexbox do its resizing magic. Your browser doesn’t support HTML5 video. Here is a link to the video instead. Notice how the slants actually change shape as the screen gets narrower or wider. This is because they’re still three-quarters the width of the image element’s box, but the width of that box is changing as the screen width changes. That means at narrow widths, the slant is much steeper, whereas at wide widths, the slant is more shallow. But since the clipping path’s coordinates were all set with percentage distances, they all stay parallel to each other while being completely responsive to changes in screen size. An absolute measure like pixels would have failed. But how did the images get closer together just by adding in two more? Because the list items’ basic sizing added up to more than 100%, and they’re all set to flex-shrink: 1. No, you didn’t miss a line in the CSS: 1 is the default value for flex-shrink. Flex items will shrink by default, which after all is what we should expect from a flexible element. If you want to know how much they shrunk, and why, here’s what Firefox’s flex inspector reports. When there were only two list items, there was space enough for both to be at their base size, with no shrinkage. Once we went to four list items, there wasn’t enough space, so they all shrank down. At that point, having a negative right margin of -7.5% was just right to pull them together to act as a unit. So, now they’re all nicely nestled together, and fully responsive! The captions need a little work, though. Notice how they’re clipped off a bit on the left edge, and can be very much clipped off on the right side at narrower screen widths? This happens because the li elements are being clipped, and that clipping applies to all their contents, images and text alike. And we can’t use overflow to alter this: clipped is clipped, not overflowed. Fortunately, all we really need to do is push the text over a small amount. Inside the feature query, I added: #page-top .monoliths div { padding-left: 2%; padding-right: 26%; } This shifts the text just a bit rightward, enough to clear the clip path. On the right side, I padded the div boxes so their contents wouldn’t fall outside the clipped area and appear to slide under the next caption. We could also use margins here, but I didn’t for reasons I’ll make clear at the end. At the last minute, I decided to make the text at least appear to follow the slants of the images. For that, I just needed to shift the first line over a bit, which I did with a bit more padding. #page-top .monoliths strong { padding-left: 1%; } That’s all to the good, but you may have noticed the captions still overlap at really narrow screen widths. There are a lot of options here, from stacking the images atop one another to reverting to normal flow, but I decided to just hide the captions if things got too narrow. It reduces clutter without sacrificing too much in the way of content, and by leaving them still technically visible, they seem to remain accessible. @media (max-width: 35rem) { #page-top .monoliths div { opacity: 0.01 } } And that, as they say, is that! Fully responsive slanted images with text, in an accessible markup structure. I dig it. I did fiddle around with the separations a bit, and found that a nice thin separator occurred around margin-right: -8%, whereas beefier ones could be found above -7%. And if you crank the negative margin value to something beyond -8%, you’ll make the images overlap entirely, no visible separation—which can be a useful effect in its own right. I promised to say why I used padding for the caption text div rather than margins. Here’s why. #page-top .monoliths div { padding-left: 3%; padding-right: 26%; border-top: 2px solid transparent; background: linear-gradient(100deg,hsl(292deg,50%,50%) 50%, transparent 85%); background-clip: padding-box; } It required a wee bit more padding on the left to look decent, and an alteration to the background clipping box in order to keep the purple from filling the transparent border area, but the end result is pretty nifty, if I do say so myself. Alternatively, we could drop the background gradient on the captions and put one in the background, with a result like this. I have no doubt this technique could be extended, made more powerful, and generally improved upon. I really wished for subgrid support in Chrome, so that I could put everything on a grid without having to tear the markup structure apart, and there are doubtless even more interesting clipping paths and layout patterns to try out. I hope these few ideas spark some much better ideas in you, and that you’ll share them with us! About the author Eric A. Meyer (@meyerweb) has been a burger flipper, a college webmaster, an early blogger, one of the original CSS Samurai, a member of the CSS Working Group, a consultant and trainer, and a Standards Evangelist for Netscape. Among other things, Eric co-wrote Design For Real Life with Sara Wachter-Boettcher for A Book Apart and CSS: The Definitive Guide with Estelle Weyl for O’Reilly, created the first official W3C test suite, assisted in the creation of microformats, and co-founded An Event Apart with Jeffrey Zeldman. Eric lives with his family in Cleveland, Ohio, which is a much nicer city than you’ve probably heard. He enjoys a good meal whenever he can and considers almost every form of music to be worthwhile. More articles by Eric Full Article Design css
x Cigarette taxes and smoking among sexual minority adults [electronic resource] / Christopher Carpenter, Dario Sansone By darius.uleth.ca Published On :: Cambridge, Mass. : National Bureau of Economic Research, 2020 Full Article
x The effects of e-cigarette taxes on e-cigarette prices and tobacco product sales [electronic resource] : evidence from retail panel data / Chad D. Cotti, Charles J. Courtemanche, Johanna Catherine Maclean, Erik T. Nesson, Michael F. Pesko, Nathan Tefft By darius.uleth.ca Published On :: Cambridge, Mass. : National Bureau of Economic Research, 2020 Full Article
x Cigarette taxes and teen marijuana use [electronic resource] / D. Mark Anderson, Kyutaro Matsuzawa, Joseph J. Sabia By darius.uleth.ca Published On :: Cambridge, Mass. : National Bureau of Economic Research, 2020 Full Article
x Suburban Xanadu [electronic resource] : the Casino Resort on the Las Vegas Strip and Beyond By darius.uleth.ca Published On :: Hoboken : Taylor & Francis, 2003. Full Article
x The evolving consequences of OxyContin reforumulation on drug overdoses [electronic resource] / David Powell, Rosalie Liccardo Pacula By darius.uleth.ca Published On :: Cambridge, Mass. : National Bureau of Economic Research, 2020 Full Article
x Reluctant warriors: Germany, Japan, and their U.S. alliance dilemma / Alexandra Sakaki, Hanns W. Maull, Kerstin Lukner, Ellis S. Krauss, Thomas U. Berger By library.mit.edu Published On :: Sun, 22 Mar 2020 07:44:49 EDT Dewey Library - UA710.S135 2020 Full Article
x Insurgency prewar preparation and intrastate conflict: Latin America and beyond / Joel J. Blaxland By library.mit.edu Published On :: Sun, 29 Mar 2020 07:44:51 EDT Online Resource Full Article
x Extreme reactions: radical right mobilization in Eastern Europe / Lenka Bustikova, Arizona State University By library.mit.edu Published On :: Sun, 29 Mar 2020 07:44:51 EDT Dewey Library - JC573.2.E852 B88 2020 Full Article
x Territorial sovereignty: a philosophical exploration / Anna Stilz By library.mit.edu Published On :: Sun, 29 Mar 2020 07:44:51 EDT Dewey Library - JC327.S79 2019 Full Article
x The suspect: an Olympic bombing, the FBI, the media, and Richard Jewell, the man caught in the middle / Kent Alexander & Kevin Salwen By library.mit.edu Published On :: Sun, 29 Mar 2020 07:44:51 EDT Dewey Library - HV8079.B62 A44 2019 Full Article
x Cold War Exiles and the CIA: plotting to free Russia / Benjamin Tromly By library.mit.edu Published On :: Sun, 29 Mar 2020 07:44:51 EDT Dewey Library - JK468.I6 T76 2019 Full Article