Git Product home page Git Product logo

Comments (5)

joyously avatar joyously commented on June 12, 2024

We should use more than one!
I suggested this in #core-editor. It would be so easy to do editor styles if they were Custom Properties.
I used a polyfill for older browsers, but I used them extensively in a theme I wrote this past year.

from twentynineteen.

joyously avatar joyously commented on June 12, 2024

@mor10 Can you think of a way to use one? Since we still have to support IE11, it's difficult without a polyfill, but what if there were a progressive enhancement, such as background-blend-mode or something for modern browsers? If we use a variable there, we don't have to worry about IE11.

from twentynineteen.

joyously avatar joyously commented on June 12, 2024

@mor10
Can you put a variable in for the featured image mix-blend-mode? There is already alternate support for the old browsers, so that's a case where there would be only modern browsers using it.

from twentynineteen.

mor10 avatar mor10 commented on June 12, 2024

We don't need to put an actual functional variable in the code. It could just be a color that falls back on a hard-coded color:

:root {
  --key-color: #4169E1;
}

.entry-title {
  color: #4169E1 /* fallback for older browsers */
  color: var(--key-color);
}

Of course this could (and probably should) be expanded to handle color schemes if this theme ships with them, but that's a lot more complex. Starting small still makes a huge difference.

from twentynineteen.

kjellr avatar kjellr commented on June 12, 2024

I don't believe this ended up happening for launch, due the compressed timeline and other priorities. I'm going to close this issue rather than migrate it over to Trac, as it's not quite actionable at this stage. If anyone has ideas for using one of the custom properties mentioned moving forward, feel free to open up a Trac ticket for discussion.

Thank you!

from twentynineteen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.