Questions tagged [class-names]

69 questions
48
votes
3 answers

How to use clsx in React

I am trying to understand some uses of clsx in assigning classnames to a component in React. The construct className={clsx(classes.menuButton, open && classes.hide)} is clear enough. It applies 'classes.menuButton', and also applies…
millport
  • 1,833
  • 4
  • 19
  • 17
34
votes
4 answers

Selenium Compound class names not permitted

I have the below code that clicks on an element to pop up a screen and copy the text in it el1 = driver.find_element_by_id("keyDev-A") el1.click() el2 = driver.find_element_by_class_name("content") print(el2.text) However, when I tried to get…
jake wong
  • 3,900
  • 8
  • 32
  • 70
19
votes
3 answers

Is it possible use a class name in java switch/case statement?

I would like to use a java switch statement, which uses class names as case constants. Is it possible somehow? Or do I have to duplicate the class names? Following code does not work because of compiler error: case expressions must be constant…
dedek
  • 6,771
  • 3
  • 33
  • 66
12
votes
1 answer

Prefixing JAXB generated classes

I have this Maven "task" to generate Java classes from an XSD file using JAXB. com.sun.tools.xjc.maven2 maven-jaxb-plugin
Bart van Heukelom
  • 40,403
  • 57
  • 174
  • 291
11
votes
5 answers

Selenium python find_element_by_class_name() stopped working from v 2.2 to 2.21 -- cannot use 'Compound Class Name'

I am using Selenium's python library to scrape data from a html page in Firefox. I have had to update from Selenium 2.0 to 2.21 because the server has updated Firefox. In v 2.21 calls to find_element_by_class_name("grid-cell-inner grid-col-name")…
9
votes
7 answers

Is it possible to have two classes with the same name if they're in different folders?

I was wondering if there is anything wrong with having two classes with the same name in PHP if they're in different sub folders, other than the obvious "human factor" of editing the wrong file by mistake? I have looked for other posts relating to…
Chris
  • 872
  • 1
  • 10
  • 20
7
votes
3 answers

Is there an elegant way to add multiple HTML classes with XSLT?

Let's say I'm transforming a multiple-choice quiz from an arbitrary XML format to HTML. Each choice will be represented as an HTML
  • tag in the result document. For each choice, I want to add an HTML class of correct to the
  • if that choice…
  • Jakob
    • 2,329
    • 4
    • 25
    • 33
    6
    votes
    1 answer

    How to combine multiple classNames in React?

    I'm writing a small React app with Create-React-App. For simple styling tweaks I use tachyons-css. Due to frequent reappearing CSS styling issues I recently switched from classic CSS styling to CSS modules (also valid question for SCSS). Now I…
    ft-be
    • 63
    • 1
    • 6
    6
    votes
    3 answers

    Does Symbol table for C++ code contain function names along with class names?

    I have been searching through various posts regarding whether symbol table for a C++ code contains functions' name along with the class name. Something which i could find on a post is that it depends on the type of compiler, if it compiles code in…
    6
    votes
    13 answers

    Really long class/variable/property/method names

    Some friends and colleagues of mine have a little running contest to find or write the longest class/variable/property/method names possible. Keep in mind, we try to be good boys and girls and keep the naming intelligible and concise, while still…
    Zachary Yates
    • 11,664
    • 7
    • 50
    • 84
    5
    votes
    2 answers

    Can class name be referenced implicitly at compile-time?

    Is there a way to implicitly reference a class' name at compile-time? Specifically, if I want to declare an instance of template class A using class B from within the scope of class B, is there a way to avoid explicit reference to "B" in the syntax…
    StoneThrow
    • 3,821
    • 11
    • 42
    5
    votes
    1 answer

    Change paper color Material-UI

    I'm developing a React project using the material-ui library. I'm currently trying to add a drawer which is working fine for me. However, I'm trying to change the background color of this drawer. I've heard that the way to do this is by changing the…
    Sean
    • 219
    • 1
    • 6
    • 13
    5
    votes
    1 answer

    classnames_1.default is not a function when testing with Jest

    I am facing issue with running test cases on Jest when classnames ( https://www.npmjs.com/package/classnames ) library is being used : It throws error : classnames_1.default is not a function It is working with webpack on website itself.. so i don't…
    Anil Sharma
    • 235
    • 1
    • 4
    • 15
    4
    votes
    6 answers

    Is "World" reserved Class name in AS3?

    Does anyone knows something about "World" being reserved or built in class with that name? when I try to construct the World class I've created it throws compile error: 1136: Incorrect number of arguments. Expected 2. But I've million times…
    Rihards
    • 9,751
    • 14
    • 53
    • 76
    3
    votes
    1 answer

    React - using classNames with imported css

    I'm using react and I found this awesome library that helps you define css classes for components called classNames. I'm also using the webpack css-loader in order to import css into my component and when trying to use classNames with import css I…
    Golan Kiviti
    • 2,960
    • 6
    • 29
    • 55
    1
    2 3 4 5