These are chat archives for FreeCodeCamp/HelpFrontEnd

10th
Aug 2018
Rob
@PGFracing
Aug 10 2018 03:16
does Sublime have a developer mode like Chrome?
abraham anak agung
@padunk
Aug 10 2018 05:32
@PGFracing what for?
antonshevyrin
@antonshevyrin
Aug 10 2018 07:37
Hi all! Can somebody explain please - should I submit solutions with test suite included or not? It seems that this topic is left unanswered: https://forum.freecodecamp.org/t/should-i-submit-with-the-test-suite-linked/197703/3
abraham anak agung
@padunk
Aug 10 2018 09:03
@antonshevyrin i think it doesn't matter. As long as you passed all the test for certain projects, you can submit it with or without test suite.
shivendrarox
@shivendrarox
Aug 10 2018 09:17
can somebody help me with this:
$(".fa."+openCards[i-2].slice(3)).removeClass("open show");
this code should remove the class from two elements, but its not doing that
Serenity
@qmikew1
Aug 10 2018 10:03
@antonshevyrin - I would leave the test suite linked. The forum question is more about subjective style/or UI'ish in nature (yes, I agree (going from memory (full disclosure: I haven't been keeping up with curriculum or new version etc.) that the suite was kind of ugly/annoying) – but that's not hindering you from submitting your projects (and would likely delay review (wider automation purpose)) If it were me, I'd just do an alternate version for presentation if I wanted more control (like in the case of somebody visiting portfolio/projects as discussed in the post) – but that's not really an answer.
Maybe post your own question to forum or open an issue (though you'd need to make your case (e.g., 'needs improvement, because…', 'creates issues with x stuff' – that sort of thing)).
antonshevyrin
@antonshevyrin
Aug 10 2018 10:40
@padunk @qmikew1 thank you for responses!
@qmikew1 I think I'll do as you suggested - submit version with test suite but add version without test suite to portfolio.
Rogério Dalot
@Dalot
Aug 10 2018 11:01
Hey guys, how could I calculate how much a positioned absolute div element will take up on the screen?
in terms of height
antonshevyrin
@antonshevyrin
Aug 10 2018 11:16
Rob
@PGFracing
Aug 10 2018 11:33
@padunk so I don’t have to use to programs so I can do it quicker right from sublime
Rogério Dalot
@Dalot
Aug 10 2018 11:35
@antonshevyrin It would be but that is a "lie" sometimes
some inner divs have higher height than the outer div
@antonshevyrin Do you have any idea how to solve that?
antonshevyrin
@antonshevyrin
Aug 10 2018 11:39
@Dalot so, do you want to get height of visible part of inner div, correct?
Rogério Dalot
@Dalot
Aug 10 2018 11:40
@antonshevyrin Yes, I think so :P
Actually, now that I see, I only have that problem on one div, is there any simpler way to hack this through css? @antonshevyrin
@antonshevyrin I guess that what's happening is that the grandad DIV is not "stretching" out its height to make it the same as the inner divs
antonshevyrin
@antonshevyrin
Aug 10 2018 11:51
@Dalot
You can set grandad height to height: auto; to stretch it
Does it help?
James Itum
@isemaj_gitlab
Aug 10 2018 12:10
Hi, I have a problem with my React app that when I type on <textarea> it automatically goes to the end and it doesn't automatically update the child component where I pass the state. My code is here. https://gitlab.com/isemaj/fcc-markdown-previewer/tree/master. I saw on the other post that redux might solve the problem but I'm still not sure.
Federico Dente
@fez994
Aug 10 2018 12:20
Hello guys i'm having problems aligning the two radio button in the form, can anyone help? https://codepen.io/fez994/pen/XBoWOr
I would like them to be on the same line like the rest of the form
Rogério Dalot
@Dalot
Aug 10 2018 13:37
Hey @fez994 have you tried using flexbox?
Federico Dente
@fez994
Aug 10 2018 13:38
@Dalot Have you read my code? I'm using flexbox
Rogério Dalot
@Dalot
Aug 10 2018 13:40
@antonshevyrin well I am definitely going to try that thanks
@fez994 I am on mobile thats why I did not see
Moisés Man
@moigithub
Aug 10 2018 14:00
@fez994 did u use "inspect element" from ur browser devtool before ?
Moisés Man
@moigithub
Aug 10 2018 14:28
u could wrap (ie. a div) those 2 radio elements and apply flex:2 on the wrapper.. (to have a similar styles like ur element before, flex:1 on label.. flex:2 on the elemnt next to it)
Federico Dente
@fez994
Aug 10 2018 15:08
@moigithub Yeah this worked thank you my man
newmoon
@newmoon
Aug 10 2018 15:46

@Dalot This may help with figuring out the height of the element via JS: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements
For example:

window.getComputedStyle(myDiv).getPropertyValue("height"); // height
myDiv.clientHeight; // height + padding
myDiv.offsetHeight; // height + padding + border

If you're hoping to do this with CSS, it isn't possible as far as I know to calculate the height of another element. You can use percentages though to give a child element a height relative to its parent, grandparent, etc.

Rogério Dalot
@Dalot
Aug 10 2018 16:00
@newmoon Amazing newmoon! amazing! Thank you
Ahmed Al-Gallad
@A-Gallad
Aug 10 2018 16:29
Hello all
Gyula Rusinczky
@gyrusinczky_twitter
Aug 10 2018 16:55
Hey Guys, I’m building a website for myself w/ Bulma CSS to share the photos of my travels. I added a CSS zoom effect to some of the images on my website (https://onlyoneframe.co), struggling to center the images. Any tips?
Lia-Sue-Kim
@Lia-Sue-Kim
Aug 10 2018 19:51
which one is serif fonts ?
arial helvetica or times new roman
Ayman97
@Ayman97
Aug 10 2018 20:45
Hello
Ayman97
@Ayman97
Aug 10 2018 20:55
What's up everyone :)
I'm practicing on frontend projects with bem as a css naming convention. but i think i messed something. If i have one large component (eg: article card) with the class "article".
is that means all the decadents must have "article" prefix in their classes names?
Moisés Man
@moigithub
Aug 10 2018 21:20
(from my understanding....)
"large components" can be splitted on "smaller components"
and each will be different
soo u could have an "article" block .. with all its own attributes
and another "card" block separatedly,,
and use "nested blocks" @Ayman97
Ayman97
@Ayman97
Aug 10 2018 21:56
So this is valid?
<div class="account"> <h1 class="account__name">...</h1> <div class="wallet"> ... </div> </div>
@moigithub
newmoon
@newmoon
Aug 10 2018 23:05
@Lia-Sue-Kim Times New Roman