Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
21 views

How to set conditional props to manage different classes with Typescript

I'm a beginner and I have a question about conditionals. Hope to explain it clearly. So, I have some props and based on different conditionals I want to apply different classes to div elements. I'm ...
maria russo's user avatar
0 votes
1 answer
50 views

React Button Component custom classname

I have a React Button Component like that // src/components/Button.jsx import PropTypes from 'prop-types'; import styles from './Button.module.css'; import classNames from 'classnames'; const Button =...
sahilkundu's user avatar
0 votes
0 answers
50 views

Broken tailwind classname when built to production, NextJs 14

Im working on a project using: Next.JS 14.1.0 Tailwind 3.3.2 MantineUI 7.6.1 as my UI library Everything works find when I build my components when running next dev. But when the app is deployed to ...
Sunchhay's user avatar
0 votes
2 answers
125 views

How do I give react router Outlet a className?

I'm using react with react router for the client-side routing. I have a header, outlet, and footer. What I want is to give the Outlet a classname so that every component get's a margin-top. Is there a ...
GoldenBags's user avatar
2 votes
0 answers
32 views

React CSS multiple inline styles VS class performance-wise

Who wins from performance perspective (only) INLINE STYLES <div style={{backgroundColor:"#fff"}}>content</div> <div style={{backgroundColor:"#fff"}}>content</...
johnny shepherd's user avatar
0 votes
3 answers
58 views

how can i write className with function in react js

I am new to ReactJS and JSX and I am having a little problem with the code below. I am trying to add multiple ways to the className attribute <ul className="iqacbar-nav" id="iqacbar-...
Prasanna's user avatar
0 votes
1 answer
191 views

Nativewind styles are not being applied in react native and expo application

I am building a react native application with expo. I am trying to style it using Nativewind. But when I am trying to apply the styles to the components, they are not being applied. No error is ...
Niharika Gupta's user avatar
0 votes
1 answer
103 views

What are the class names of the first-level and second-level menus of the workspace right-click menu?

I want to customize the style of vscode and use the apc extension. Now I want to know the class name of the right-click menu. Reason: I know it can be set through menu.background in workbench....
Storm Lee's user avatar
0 votes
1 answer
34 views

Can Next.JS className be set programatically with useContext? Getting error "Warning: Prop `className` did not match."

I have a child component which needs to dynamically render a className based on the value of useContext. When I do this, Next.JS gives the following error: Warning: Prop className did not match. ...
Ed Brissenden's user avatar
0 votes
0 answers
33 views

In PHP is there a way to get the full class name from the short name of a class that is specified in a use statement [duplicate]

When a class has been specified in a use statement, it can be referred to by the final element of the fully namespaced class name. Evidently PHP knows from the short name the identity of the class. Is ...
mbrampton's user avatar
  • 135
-1 votes
1 answer
275 views

How to deal with multiple lines in class name in html code

I need to find all elements in an html which go by a certain class name. But the class name for some reason consists of a multiple lines as well as multiple spaces. Here is the exact class name I ...
mr.Jenkins's user avatar
-2 votes
1 answer
192 views

What's the syntax of clsx to add two classNames when one condition satisfied?

I have a menu block, i use clsx lib for the conditional classname rendering. I wanna add two className at the same line when the condition satisfies. Some one can tell me the right syntax ? For now i ...
Herma's user avatar
  • 53
1 vote
1 answer
155 views

Is it possible to refer to regular class names using module.css/module.scss?

This might be a dumb question, but I am relatively new to using the CSS/SCSS modules with React. And I have valid reasons for asking, as modules allow scoping of CSS (which is useful to prevent CSS ...
hokwanhung's user avatar
0 votes
1 answer
65 views

without constructor, is there a way to get child class name in JavaScript?

I have a class A and a child class B . now i want to print child class name from a static method of parent class. but both of them doesn't use constructor or new keyword. Class A { static run() { ...
Sifat Playz's user avatar
0 votes
0 answers
119 views

cannot retrieve class name in a kotlin fragment class

I am trying to get name of the class of a fragment which is a kotlin class but it returns `y0' instead of the class name I am expecting this should return PairEVFragment I will paste entire class in ...
BRDroid's user avatar
  • 4,358
1 vote
1 answer
123 views

When the project starts, it does not load some tailwind class names from a ternary operator (react)

When I start my project it does not load certain tailwind classnames when this classname comes from a react property, I attached a video showing the error, I want to know how to make it load the color ...
Gui 's user avatar
  • 13
1 vote
0 answers
125 views

Python Selenium Unable to locate element [NoSuchElementException] when using CLASS_NAME selector

When I try to use find_element(By.CLASS_NAME, 'classname'), it will always return NoSuchElementException, unable to locate element. But when I use ID and NAME on the same element, it worked! Only ...
Amin Affandi's user avatar
0 votes
1 answer
79 views

javascript: querySelector containing @ symbol is invalid

I have an element with a className containing an @ symbol. Such as <div class="modify@s"> I can easily style this via a css selctor such as .modify\@s But I can't use this selector to ...
Type-Style's user avatar
  • 1,831
0 votes
1 answer
31 views

I want to call and modify the element that I want to choose in same classes

I don't know how to call the single or any element in same classes like if p.innerHTML == null then the background of div will change or make any code. The only thing I know is getting a document by ...
user avatar
1 vote
1 answer
267 views

Undefined type 'gnupg' class name error using VS Code with PHP and Intelephense extension

Screen shot of the error in VS Code: Even with checking phpinfo() you will see gnupg installed and an active extension. The code will execute properly. But in VS Code you are given a fatal error and ...
MisterG13's user avatar
  • 220
-1 votes
1 answer
113 views

How to loop through a list of classnames in C#

I'm working on a template-based C# application. This application saves entries to a database, using the procedure database.SaveChanged(). I would like to see the list of things which are to be changed,...
Dominique's user avatar
  • 17.3k
3 votes
1 answer
346 views

Puppeteer cannot read a classname with spaces

Someone tell me why puppeteer cannot readme a classname with spaces, but a id or name it's works. I need help, i just make a simple automation. const puppeteer = require("puppeteer"); (...
ScottBrown623's user avatar
0 votes
2 answers
53 views

Switching between multiple classnames in one element

I wanna switch between two classnames in one element in react by clicking a button. When I click the "Solution" button, the classname of the h1 changes from "solution" to "&...
Brinda5's user avatar
  • 17
0 votes
1 answer
230 views

In Chrome, style.fontFamily doesn't work for a barcode font, but className does

Consider the following html: <style> .barcode { font-family: 'BC C39 3 to 1 Medium'; } </style> <div><span id='spn'>1234567</span></div> The following will set the ...
Svein Ola Sjovold's user avatar
0 votes
1 answer
502 views

How to add and remove a class from an input label using refs?

I have a React component that includes an input element and a corresponding label element. I want to add and remove a class from the label element based on whether the input element has a value or not....
Nicke7117's user avatar
  • 197
0 votes
1 answer
206 views

MongoDB Kafka Sink Connector - postprocessor post.processor.chain class not loading

We are trying to implement Custom Postprocessor for Kafka MongoDB Sink connector. However, we are getting classname pattern not found error. sink-connector.properties post.processor.chain=yyyy.kafka....
Ranga's user avatar
  • 1
0 votes
1 answer
2k views

Tailwindcss + Nextjs problems with class + variables

Good afternoon, I need help with a big problem I'm having with tailwindcss + nextjs... So the problem is when it comes to setting the classes, I need to use a variable, the class is set in the css, ...
Weslley Dev's user avatar
1 vote
0 answers
143 views

FrontEnd - Obfuscate classname in reactjs of MUI components

I'm trying to find the way to hash classname of all the components that use mui in my project and can't seem to find the right way. I want output like facebook or google all classes are hashed. If the ...
Nguyen Cong Minh's user avatar
1 vote
0 answers
190 views

How can I compile my React component's styles (JSX and CSS Modules) to be used statically — as a simple imported .css file?

Background I'm creating a public Node package which consists of some React UI. I'm currently using CSS Modules to scope the styles to the component, and it's all being successfully bundled with ...
Andrew Rubin's user avatar
0 votes
2 answers
59 views

NoSuchElementException using driver.find_element(By.CLASS_NAME,'list-card-heading') in Selenium

For the below line of code: driver.find_element(By.CLASS_NAME,'list-card-heading') I am getting below error: NoSuchElementException Traceback (most recent call last) Input In [23], ...
user20660075's user avatar
0 votes
1 answer
41 views

if statement not executing action even though condition is met

I'm trying to change the class of an element based on some conditions. const pwnButtonHidden = document.querySelector(".pwn-button-hidden"); let condition = 0; for (let idNumber = 1; ...
Guchierrez's user avatar
0 votes
1 answer
674 views

why css is not working in my react component?

I am importing css from main.css file to Main.js file, but css is not working completely? //This is Main.js code-- This is Main.js screenschot This is main.css screenshot This is website screenshot ...
Piyush Kumar's user avatar
2 votes
2 answers
1k views

How can I use tailwind-css to style the active state of the Navlink(react-router-dom)?

I am trying to use a template literal for the className of the Navlink but it does not work. This is current code: className={`px-2 py-2.5 hover:bg-cprimary-300 hover:text-csecond-100 rounded-md ...
nischalmainali21's user avatar
0 votes
1 answer
1k views

How to add specific styles to className in Tailwind

I am passing a style to a checkbox when it is checked, but I do it in my tailwind.css file. I am wondering if it is possible somehow to do it in className inline, because I do not want really to add ...
kukri's user avatar
  • 93
0 votes
0 answers
123 views

How to properly set the name of the BEM class for different card designs

Let's imagine that the task before us is to develop 50+ unique types of cards, headers, footers, etc. It will be okay if I name the card types like this: card-23, card-24 Or is there a better solution?...
Mykyta Severyn's user avatar
0 votes
1 answer
1k views

TailwindCss not showing color picker in vscode on windows

How do I get the color palette directly in my code... Tags: TailwindCSS, React, VS Code? I tried erasing the entire line, rewriting the code, for example, bg-[#2c2f32], but the color is not showing at ...
Augustine Tonia Davidson's user avatar
3 votes
1 answer
199 views

Why this __METHOD__NAME__ requires a memory copy?

The idea is from https://stackoverflow.com/a/15775519/1277762 I added a '\0' at end of string_view so we can use data() for printf, spdlog, et al. I use this macro to print function name with class ...
Kang Jianbin's user avatar
-1 votes
2 answers
45 views

Why can't I enter the code? mui tag conditional

Why can't I use boolean? I want to check whether I am an admin or not. and hide the button or disable the button const Authenticate = useSelector(userSelector) let check :boolean = true; <Link ...
okmmy123456's user avatar
-2 votes
1 answer
870 views

Get the fully-qualified name of a class in Java, Class.forName [closed]

I want to recognize the class type from a string given through the command line. For example, args[0] = "Integer", Now I do in this way: Class<?> cls = Class.forName(args[0]); But I ...
Matteo Rigat's user avatar
1 vote
1 answer
39 views

I'm trying to update a className in a React component, using itenerary statement but for some reason the className is not updated. How come?

This is a simple todo list app. I'm using a ternary condition in order to update a child component (third line). once the user clicks on the second button (last button), a function in the parent ...
Noga Vigdor's user avatar
1 vote
0 answers
50 views

Add style to part of a string

I want to bold my text between *. For example: This text is bold and this two bold bold. I can also use a mark that is not bold. I map my string in as a value. (I want to also find all Enters so I ...
McKrus's user avatar
  • 37
0 votes
1 answer
31 views

How to use components in different ways (React)

I want to use simple components in different way and different ui rendering For example a dropdown rendering a list may have several ui according to the page or context (=> padding, margins, font ...
Ron Bellaiche's user avatar
1 vote
0 answers
66 views

Customize className seen in the DOM with react css modules

I was thinking, when I use react css modules I end up with visible class names like Form__module_bhj34 (something like this). What is my goal, to get rid of the first and second part and end up jsut ...
user20251230's user avatar
1 vote
1 answer
181 views

Different types of class names in html

What is the diff bw class="name" class="name-new" class="name new" What is the difference bw the three and is there any other naming convention too?
user17257777's user avatar
-1 votes
1 answer
197 views

How can i delete width in react - bootstrap class?

I'm doing an internet-store, and i have a problem with top panel. I tried everything to fix it, but only when i change class row in dev tools i can get result. row>* { flex-shrink: 0; width:...
Vova's user avatar
  • 23
0 votes
1 answer
496 views

Using map method, how to use multiple classname in React.js?

please check out my code first. import styles from './calculator.module.css'; const BUTTONS = [ { key: '+/-', styled: 'symbol', }, { key: '0', }, { key: '.', styled: '...
Aden Lee's user avatar
  • 240
0 votes
1 answer
68 views

Change user selected Answer buttons class depending on if isCorrect is true or false

I'm pretty new to React so aware my code is probably a bit of a mess and more complicated than it needs to be. Currently when a user clicks an answer button "setDisabled" will disable that ...
Mike's user avatar
  • 3
-1 votes
2 answers
804 views

How can I dynamically update className with React js?

I have a Collection component and when I click on a div in this component, I want to change both the className of the Collection component and the className of the first sibling component after the ...
babyFrontendDeveloper's user avatar
0 votes
1 answer
454 views

apply className to one tag in React

how to apply styles to a specific tag? I started the state and on click I want the name to be applied to the class names, but it is applied to all at once. import { Button, Form, Input } from 'antd' ...
haunt_me's user avatar
1 vote
2 answers
722 views

Javascript : change class attribute value in a tag

I have an html where I want to change with a javascript function the value of one class attribute. Here is the html code : <select name="client" class="select form-select" id=&...
Goncalves's user avatar
  • 179

1
2 3 4 5
13