Username:
Password:
Remember me:
Register

Back to forum: Development News


Search forums via Google


1 Users appreciate this thread.

[BBcode] Lots of CSS-stuff (CSPOILER, CDIV)
Started by SomeLuigi
(2012-05-22 17:07:35)
SomeLuigi (2012-05-22 17:07:35)
Please be warned, these BBCodes only work in environments that allow [style], such as profile pages!

I'm sorry I keep adding things so fast, not giving you chance to catch up!

So, a (big?) problem formed when I added the spoiler:

* White-coloured text was invisible.
* The spoilers are not very customizable!


I tried adding class properties to the default spoilers. There was one problem with that:

* The default configuration was overriding the custom, [style]-based configuration.
Luckily, there was no default configuration for the content, so you can use .spoiler_content in CSS to access that.

So, I decided in the end to add a spoiler tag with NO default configuration.


[cspoiler]Hello everyone![/cspoiler]

That would create a spoiler with three classes:

.cspoiler_pad
The padding. Use this to change the background colour,
.cspoiler_bar
Use this to change the font style of the SPOILE SHOW/HIDE part.
.cspoiler_content
This is the content of the spoiler, once opened up. Default configuration: display: block; (hidden)


I decided to let you customize every custom spoiler differently, by using this:

[cspoiler(hispoiler)]Hey![/cspoiler]

The class names for that are:

.cspoiler_hispoiler_pad
.cspoiler_hispoiler_bar
.cspoiler_hispoiler_content

(so hispoiler is used to define a class name)
If you wish to keep some components the same, I added a default configuration for the pad and bar:

[cfg]spoiler.pad[/cfg]
[cfg]spoiler.bar[/cfg]
or
[cfg(hispoiler)]spoiler.pad[/cfg]
[cfg(hispoiler)]spoiler.bar[/cfg]

Please note:

The content does not have/need a default configuration, because it doesn't have one anyway!


To go along, cdiv was added.

[cdiv(hidiv)]Content[/cdiv]

Class name:

.cdiv_hidiv


(so hidiv is used to define a class name)



Hope you enjoy!

There are bound to be bugs, so please report those to me.


Edit 23 May 2012:

The format for custom CSS classes has changed, due to some buggy nonsense.


This post has been edited one or more times, the last time was:
2012-05-25 16:15:03

SomeLuigi is changing in 2015.
SomeLuigi (2012-05-22 20:34:59)
Read the top of the post, GreenGuy
SomeLuigi is changing in 2015.
SomeLuigi (2012-05-23 16:29:35)
@japzone "hispoiler" was just an example classname
SomeLuigi is changing in 2015.
Leroy (2012-06-03 07:54:57)
These Codes work only in [style][/style] alowed enviorments
[IMG]http://i61.tinypic.com/jhyjc5.png[/IMG]
Created By The One And Only SynTM! Rare And Not Being Made Anymore... MWAHAHHA
NikkiBear (2012-07-26 16:10:33)
[cspoiler]Hey hey hey[/cspoiler]

Yea Im the Mfking Princess!!!

*~PoloGang~*
B!tch You Guessed It !
SPCOxion (2012-08-06 05:11:37)
Everyone who tried to use [cspoiler] in here obviously don't know any real CSS.
angelrulez7 (2013-07-27 17:43:20)
Awesome, DIVs!
a
PANZERFAUST (2016-02-08 17:29:49)
[STICKY REQUEST]
Also, BUMP. This is super useful.
I miss you
 

Log in to submit a comment

This topic's ID: 16672

Back to forum: Development News




Total registered users: 8058
New registered users today: 0
Newest registered user: Aurora

©  Copyright 2020 3DSPlaza. All Rights Reserved