question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support fluidStart that matches value in the breakpoints array

See original GitHub issue

Supposing I have breakpoints array = ['20em', '30em', '40em']

And fontSizes array = ['0.75em', '0.875em','1em','1.125em','1.375em']

And I set fluidStart = 20em which is the first breakpoint in my array

And I want to use fluid fontsizes = [2, 3, 4] // 1em, 1.125em, 1.37em @ 20em, 30em, 40em bps

Setting fluidStart to the same value as a breakpoint in the array doesn’t produce the correct fluid font sizes. The 1.125em fontsize is being used to calculate fluid font between 20em and 30em bps instead of the 1em fontsize .

It works as in your example if the fluidStart value isn’t in the breakpoints array so that bp array becomes only ['30em','40em']. But I don’t want to change my bp array as it is being used for other components design.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
galacemiguelcommented, Jan 21, 2020

It seems the issue still stands. Using a fluidStart in the breakpoints array is interpolating incorrectly.

Ah, that’s right. I had not anticipated this kind of usage. Will work on it, thanks!

As I stated earlier, your example used a fluidStart not in the breakpoint array which led to my confusion and bringing up this issue and #7.

Can we close #7 though now? @elitenoire

0reactions
elitenoirecommented, Jan 20, 2020

It seems the issue still stands. Using a fluidStart in the breakpoints array is interpolating incorrectly. Here is a codesandbox to help test out values.

// theme.js
const theme = {
  breakpoints: ["20em", "30em", "40em"],
  fontSizes: ["0.75em", "0.875em", "1em", "1.125em", "1.375em"]
};

theme.breakpoints.fluidStart = "30em"; // theme.breakpoints[1]
// Fluid Text component
fontsizes = [2, 3, 4]

With the above, I expect only the last fontSize to be fluid.

Read more comments on GitHub >

github_iconTop Results From Across the Web

LNCS 2764 - Approximation, Randomization, and Combinatorial ...
Abstract. We consider the following general correlation-clustering prob- lem [1]: given a graph with real edge weights (both positive and nega-.
Read more >
(2022) - Bootstrap 5 From scratch with 13 Projects - Skillshare
The breakpoints are media queries that Bootstrap is using for responsive design. ... tied to match with a lighter color to help to...
Read more >
pancreatic mitochondrial function - WorldWideScience
Here we report that TfR1 supports mitochondrial respiration and ROS production in human pancreatic ductal adenocarcinoma (PDAC) cells, which is required for ...
Read more >
Untitled
Apple help desk nz, Online karten tarot, Winters day images, My uverse dvr won't ... Multidimensional array c++ declaration, Horse betting trifecta wheel, ......
Read more >
PhysX SDK Training Programs Overview - Scribd
the cloth tearable, how to assign a pressure value within a fully ... (AGEIA PhysX PPU or a supported GeForce GPU) to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found