CSS

662 readers
3 users here now

founded 2 years ago
MODERATORS
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
 

Yes it works and no, we can't

Before you, like me, fire up Safari and start editing some CSS, I have bad news: no, it doesn't work on the web. As well it shouldn't. But it also doesn't work by default in an app using WKWebView, you have to toggle a setting in WKPreferences called useSystemAppearance... and it's private. So if you use it, say goodbye to App Store approval.

Who cares?

It's an interesting piece of trivia but no-one outside of Apple can use it.

… ffs 🤦

42
 
 

Hello everyone good to see there's a CSS community so it's time to start trying to break stuff.

Basically I am a Grid novice who has the classic HTML grid example:

<div class="grid">

  <div class="item">1</div>
  <div class="item">2</div>
  <div class="item">3</div>
  <div class="item">4</div>
  <div class="item">5</div>
  ...
</div>

For which I've posted a codepen.

My problem is, I want to make it so that the number of columns adjusts as multiples of a given basis I want. Basically I'd expect this part to have worked:


div.grid.notworks {
  grid-template-columns: repeat(3n, 90px); /* :( */
}

(note the 3n, not 3; like in eg.: nth-child)

Such that the container will reflow itself to host 3, 6, 9, 12, ... columns rather than 1, 2, 3, ... (as it would be on flex) or only specifically 3, as it would be with (what I understand is) the normal repeat expression in div.grid.works.

Is this possible in CSS? If yes: teach me your CSS and Firefox secrets senpai. If not: is this planned / requested?

Tags in case this helps? I hear this is the trend in the fediverse. #css #grid-layout

43
44
 
 

cross-posted from: https://lemmy.world/post/31789585

CSS for Inverting Only Bright Images in Obsidian

Hello, I'm looking for CSS code that can invert only bright images in Obsidian. Could you provide me with a script or guidance on how to achieve this? I'm not familiar with CSS, but I'd appreciate any help or clarification on the process

Thanks in advance

cross-posted from: https://lemmy.world/post/31789585 Please see the cross-post as it is updated.

45
46
47
48
49
8
submitted 11 months ago* (last edited 11 months ago) by canopas_software@programming.dev to c/css@programming.dev
 
 

Hey guys!

I’ve got something awesome for you—Tailwind Animations Examples, a brand-new collection of cool, ready-to-use animations built with Tailwind CSS.

🌟 Features

  • Complex animations made simple.
  • Copy & paste ready code.
  • Regularly updated with fresh animations.

🎯 Perfect for developers and designers who want to save time and create stunning UIs!

Check it out now!👇

https://github.com/canopas/tailwind-animations-examples

50
11
submitted 1 year ago* (last edited 1 year ago) by MaggotInfested@lemmy.dbzer0.com to c/css@programming.dev
 
 

Making a site JavaScript-less with bootstrap but the CSS is kicking my ass- I do the code directly as it is meant to be, then I try to add one thing and it breaks. I'm gripping on w3schools for dear life and I just can't seem to wrap my head around anything other than the basics. CSS is pain ESPECIALLY when I'm doing it on an external sheet. (I don't want to do internal because all the text gets overwhelming.) Anyone have some ideas to help with this?

Edit: So I realized the browser tool thing is really easy for visuals + that BOOTSTRAP IS INSANELY VAST. For just about every CSS element theirs another 1.5k sub rules which is great for getting specific but not great when you are basically creating a rule for a already ruled element that you have no way of finding easily. Bootstrap is just a functionality CSS sheet I think and not the equivalent to a HTML DLC

(Image is my CSS sheet compared to the crazy amount of CSS sub sheets that exist in bootstrap. My measly little 16 rules look pathetic)

view more: ‹ prev next ›