October 22, 2024
Chicago 12, Melborne City, USA

CSS

CSS (Cascading Style Sheets) is a representation style sheet language used for describing the look and formatting of HTML

CSS

Simulate :hover, :active, and :focus states to test styling

I’m building a restyle for a certain component library to implement a company design system. I’d like to be able to render components styled as if they were hovered / pressed / focused to be able to show and test the styles applied when the component is in one of these states. AFAICS there’s no

Read More
CSS

Apply styles of different css classes based on media query for a class

I created a css file where I have styles for texts specifically. Example .h1_24 { font-weight: 700; font-size: 24px; line-height: 140%; } .h5_18 { font-weight: 500; font-size: 18px; line-height: 120%; } ... Let’s say I have a class for a profile card: .profile { ... } How would some use styles of .h1_24 in profile

Read More
CSS

Size doesn't change when using .css()

I’m trying to make a dynamic element using jQuery, CSS and HTML. When I click on it, the function to resize the element gets executed and works properly, also revealing the "close" icon. But when I click on the close icon, the function to close the panel gets correctly executed BUT the element won’t resize.

Read More
CSS

How can I disable v-text-field focused effect?

I have following v-text-field which has following defaults // defaults.ts (used by Vuetify) const INPUT_DEFAULTS = { color: '#8AB8E5', baseColor: '#8AB8E5', bgColor: '#E8F1FA', rounded: 't-lg', persistentHint: true } const defaults = { VTextField: INPUT_DEFAULTS } and these are the CSS rules inside my base.css related to the component .v-input:not(.v-input--error) .v-label, .v-input:not(.v-input--error) .v-messages { color: rgb(var(--v-theme-secondary-text))

Read More
CSS

Background-size cover not working as expected

The image is not filling the complete body. Here’s the css: <body style="display: flex; justify-content: center; align-items: center; background-color: #f0f9fe; min-height: 100vh; width: 100%; height: 100%; background-image: url('<%= image_path('bg-blurred-pk.png') %>'); background-repeat: no-repeat; background-size: cover; background-attachment: fixed; background-position: center top;"> Tried to use background-size: 100% 100%, too. You need to sign in to view this answers

Read More
CSS

Why does my header moves down when I set it fixed?

I have the following html/css (see snippet below) which demonstrates a fixed header. I noticed that before explicitly setting the value of top to the header: top: 0px; its value is taken from the margin-top of the section and is 120px. This is seen in Chrome devtools (from header element): I am not sure why

Read More
CSS

CSS styling for dynamic video grid only shows fullscreen video

I tried programming a small interactive Website to show some Videos and Pictures in a dynamic grid. So far, the grid for the pictures works (mostly) like I want and shows all pictures in a grid. However if I try the same thing for my Videos, I only get showed the first Video in giant.

Read More
CSS

Give precedence to a css layer created via @import

The following code in a css file: @layer reset, bootstrap; @import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.css") layer(bootstrap); @layer reset{ body { margin: 0; padding: 0; font-family: sans-serif; } } does not give precedence to layer bootstrap. Layer reset has a higher precedence. How can I give precedence to bootstrap over reset? You need to sign in to view this

Read More
CSS

How to print some content in landscape and some in portrait using CSS @Media Query?

I have created a report sheet in my React project, simply its a detailed report with so many data, so this report have so many tables and need to print this report sheet in hard copy. Now what I want is I want to print some table in landscape format and some table in portrait

Read More
CSS

Why is that even after giving the container 100% width, im getting a horizontal scrollbar in the desktop view

I know to make the container not to overflow but I’m still getting the horizontal scrollbar. For the context I have used flex for the parent here (i.e .container) I checked if the child elements are the one causing the overflow but that wasn’t true. When I reduce the .container class width to 98% the

Read More