Posts on Twitter:

Recomiendo NO ACTUALIZAR a WordPress 5.0 hasta no aparezca uyna versión estable.. (a no ser que seas experto en WordPress y te sobre tiempo),

This media may contain sensitive material. Learn more View






TIL: in Safari is not possible to hide a select option with CSS (using display: none).



Show this thread













D40: I finished the Applied Vision Design section on and am completely convinced I created the best playlist on to help with .




























I like saving the for last. Otherwise, I get too caught up in the fine details of font, color, spacing, etc. Unfortunately, that means the page looks like it was assembled from magazine clippings by a kidnapper demanding ransom until it's almost done ...



Posts on Tumblr:

Part 4: Object Oriented #javascript. 👍
-
ES6 syntax allows for clean and simple addition of methods to a class. Under the hood of this class syntax, it creates a prototype method accessible to all new instances of this class.
-
Quick and simple! 🙃


Part 3: Object Oriented #javascript.
Another way of adding a method to a constructor in ES5 is to use a prototype. -
The difference here is that you can specify which new instances will inherit this method. Really neat. 😊
-
What are your thoughts on adding a method via prototype v. inside a constructor?

CSS width-based font size

For one-column responsive layouts – like this blog for example – I like using width-based font sizes. Using the vw (view width) unit, the font size automatically scales based on the width of the viewport. It’s perfectly responsive without the need for media query breakpoints (at least initially, see below).

Here’s what I found to be a good calculation:

body {
  // 1em minimum font size (usually 16px) plus
  // 0.7% of the browser window’s total width
  font-size: calc(1em + 0.7vw);
}

This however stops working as intended, once the viewport starts becoming wider than the container the text resides in. It’s very common (for me anyway) to specify a maximum width of the main element that holds the text. But vw takes into account the width of the whole browser window, which inappropriately keeps increasing the font size, while the container width remains at the maximum width specified.

For example, this blog currently specifies a max-width of 700 pixels for its main content. So, I’d like to calculate font size based on the container width of 700px instead of the whole browser window width:

@media (min-wid--th: 701px) {
  body {
    font-size: calc(1em + 700px * 0.007);
  }
}

However, since the calculation is static, I ended up simply calculating it myself in ems and use that:

@media (min-wid--th: 701px) {
  body {
    font-size: 1.306em;
  }
}

Can’t we just get max-font-size?

A note on CSS variables

While deciding on these statements above, I also tried out CSS variables to store certain values like the max-width of the container etc. to calculate the font-size like so:

:root {
  --container-max-wid--th: 100vw;
  --base-font-size: 1em;
  --container-fraction: 0.007; /* 0.7% */
}

body {
  font-size: calc(
    var(--base-font-size) +
    var(--container-fraction) *
    var(--container-max-width));
}

@media (min-wid--th: 701px) {
  body {
    --container-max-wid--th: 700px;
  }
}

But with this I

  1. need a breakpoint anyway to either redefine a variable or the calculation and
  2. I’d need additional fallback statements for browsers that don’t understand CSS vars.

So, I decided against using them. For a more complex project, this might be a different story, but for a simple site with a pretty static design, that’d be total overkill and backwards in my opinion.

pinterest.com
Pinned to CSS on Pinterest

Table of Content: Welcome to a Huge World of Elementor Get Familiar with 10 Best-Selling Elementor Plugins A Few Words in Conclusion Welcome to a Huge World of Elementor Without a doubt, Elementor is a pretender to the throne of the best drag-and-drop builder. Its range of powerful features is definitely growing. Actually, who knows? […]

Monthly most popular JS repositories. Winter wonderland

Here’s an interesting thing about January. It seems like the new year has just started and you should be full of energy and inspiration, ready to plan something new and bring it to life. But you’re not. You are exhausted with cold and too sleepy, and being active is the last thing…

instagram

Loader XLVI #microinteractions #uianimation #animation #interactiondesign #webdesign #cssanimation #css #purecss #loader #loading #uidesign #uiinspiration #designinspiration #codepen
https://www.instagram.com/p/BsnePofhdXn/?utm_source=ig_tumblr_share&igshid=1hu773kxrotop

Made with Instagram

Part 1: Object Oriented Programming with #javascript. ☺️ In es6 you can create classes that consist of a constructor function and a prototype object.
With an old style class, you define the constructor function, and the prototype object is created for you.
In ES6, the order of the two is reversed. The body of class contains contents of the prototype object, and you define a constructor.

Since the result is the same, and ES6 class syntax is just syntactical sugar, why was it important? 😎 *Increased readability
* Class-based inheritance
* Ability to assign methods in a much simpler form
-
-
-
-
-

FIXING HTTPS ERROR

When trying to edit my blog, an error popped up.  It said I couldn’t save because my urls were ‘http’ (without the ‘s’ at the end).  Copy and paste your theme code into a word processor like word or wordpad and replace ‘http’ with ‘https’ (no quotes).  That should work.  Also change your settings to enable ‘serve blog over SSL’ if it still doesn’t.  I only did minor research just now, but it worked for me.

Part 3: When not to use #javascript arrow functions 🤔
-
Arrow function cannot be used as a constructor by default. #js will throw a “TypeError: … is not a constructor”.
-
Instead, you have to use a function declaration or expression to create constructors. ☀️
-
-
-
-
-

HOW TO FIX THEME“HTTPS” ERROR

If you have received this error while trying to save your theme, here is how to fix it!

step 1: Go to your theme coding

step 2: Click CTRL + F / COMMAND + F and type in the search bar ‘HTTP’

step 3: Replace all ‘HTTP’ with ‘HTTPS’ in your theme by using the “replace with” tab. Write in ‘HTTPS’ then click “all” 

step 4: You should now be able to save your theme!

step 5: If you still get the error message, go through your theme and make sure there are no ‘HTTPSS’. Make sure to fix any mistakes with extra letters or wrong spelling.

Unit-less CSS line-height

I recently learned that it’s very practical to use a unit-less number to specify the CSS line-height. Unlike using a unit – like em, for example – this will make the line-height dependent on the text’s font-size, instead of being an absolute value.

Here’s a little example.

The markup (excerpt):

<body>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  <p>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  </p>

  <blockquote>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  </blockquote>
</body>

And here’s the CSS with unit, and the corresponding screenshot:

body {
  font-size: 1.5em; // 24px
  line-hei--ght: 1.5em; // 36px
}
p          { font-size: 1.5em; } // 36px, line-height still at 36px
blockquote { font-size: 0.8em; } // 19.2px, line-height still at 36px
Line spacing with em unit

And here’s the CSS without unit. This looks far more balanced:

body {
  font-size: 1.5em; // 24px
  line-hei--ght: 1.5; // 36px
}
p          { font-size: 1.5em; } // 36px,   line-hei--ght: 54px
blockquote { font-size: 0.8em; } // 19.2px, line-hei--ght: 28px
Line spacing without unit

Using a unit-less number seems to be a better default, because the text generally looks better when its line height is based on its font size. I seem to need less line-height statements in total and the typography looks generally more appealing.