Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-07-08 00:00:31, last edited by Koya (2016-11-22 15:19:50)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

[code=x][/code]

It'd be useful to be able to state what language is in a codebox
cQgLnoJ.png

Done by adding language as an attribute to pre (the html layout is the same and is backward compatible)

<div class="codebox">
  <pre language="CSS">
    <code>
      .noselect {
        user-select: none;
      }
    </code>
  </pre>
</div>

and add this below the pre-existing .codebox stuff.

.codebox pre[language] {
  padding-top:10px; 
  position:relative;
}
.codebox pre[language]:before {
  content:attr(language);
  position:absolute;
  width:calc(100% - 22px);
  border-bottom:1px solid #323232;
  top:3px;
  padding:0px 11px;
  padding-bottom:4px;
  font-weight:bold;
}
.codebox pre[language] code {
  margin-top:10px; 
}

-

Edit: for some languages they modify significantly from the language that would otherwise be stated and may help clear things up, so if I say [code=Handlebars][/code] then the title would be "HTML (Handlebars)"; not important

Hidden text

Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#2 2016-10-05 02:32:53

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [code=x][/code]

This post doesn't have any replies and it's very old, I think it needs a bump.
This is a great idea, I don't see why it hasn't gotten any commotion at all.

Offline

#3 2016-10-12 01:39:20

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: [code=x][/code]

ninjasupeatsninja wrote:

This post doesn't have any replies and it's very old, I think it needs a bump.
This is a great idea, I don't see why it hasn't gotten any commotion at all.

The front end stuff is ready to go.
This would help clarity in some situations.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#4 2016-11-22 15:17:52

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: [code=x][/code]

Bump.

Diff, can I get a response please - just 1 word minimum <3


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#5 2016-11-22 15:26:30

Ratburntro44
Member
Joined: 1970-01-01
Posts: 1,382
Website

Re: [code=x][/code]

is there really a point to purposely using invalid html and unnecessary css to make a glorified semi-automated header?

Offline

#6 2016-11-22 16:01:34

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: [code=x][/code]

Ratburntro44 wrote:

is there really a point to purposely using invalid html and unnecessary css to make a glorified semi-automated header?

The HTML is not invalid by any means, which part do you think it is?
I gave the source as the easiest way to implement this, the CSS just needs to be placed in the stylesheet and 1 rule needs to be added to add the language attribute from the BBCode and it all works.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#7 2016-11-22 17:33:02

Different55
Forum Admin
Joined: 2015-02-07
Posts: 16,572

Re: [code=x][/code]

I mean like most suggestions if people want it then why not.


"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto

Offline

Wooted by:

#8 2016-11-22 17:40:50

Ratburntro44
Member
Joined: 1970-01-01
Posts: 1,382
Website

Re: [code=x][/code]

language isn't a valid attribute on pre, see here on the most recent version or you can read the dtd for the version the forums are actually using here, it isn't in either of them, you can see this quite easily running through w3c's validators (which this site already fails for a number of things, but that really isn't a good reason to add more)
the easiest way to implement this is to literally just type the name above the code box you make
this provides no discernible advantage at all over that, and even just pasting the css and altering the bbcode specifier is too much time wasted to be worth doing this

Offline

#9 2016-11-22 18:01:39

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: [code=x][/code]

Ratburntro44 wrote:

language isn't a valid attribute on pre, see here on the most recent version or you can read the dtd for the version the forums are actually using here, it isn't in either of them, you can see this quite easily running through w3c's validators (which this site already fails for a number of things, but that really isn't a good reason to add more)
the easiest way to implement this is to literally just type the name above the code box you make
this provides no discernible advantage at all over that, and even just pasting the css and altering the bbcode specifier is too much time wasted to be worth doing this

Kek, I think I know what I'm saying - you can basically add an attribute called anything, it isn't always future proof but it's not illegal to create your own attributes. One of the main parts of HTML5 is the freedom to do whatever in your HTML and it works.

The advantage of what I suggested is that it's easier for Diff therefore more likely to be added.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#10 2016-11-22 21:26:01

Ratburntro44
Member
Joined: 1970-01-01
Posts: 1,382
Website

Re: [code=x][/code]

the fact that a browser will still interpret it to be the way you wish (because browsers constantly bend over backwards to make invalid html work) doesn't mean it isn't invalid, or that it is something that should be done, particular when this website is (supposedly) on strict xhtml. it could be done legally with a data attribute still, but "the freedom to do whatever in your HTML and it works" is absolutely not at all supposed to be a part of html5 (nor does this particular thing rely on the html5 standards)

either way, it doesn't change the fact that this addition is basically useless when you could just do

HTML
<html>
</html>

it adds nothing of value and honestly reads more like you trying to show off your cool css tricks than actually adding something useful here

Offline

#11 2016-11-22 21:35:42

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: [code=x][/code]

HTML5 was made so people can have as much freedom with their HTML as they like, it's not bending over backwards - it just accepts everything rather than checks a list published by w3c; it's easier to just say "we have certain actions for these elements but you can make your own and keep your HTML clean and easy to read. Also, HTML never had issues with custom attributes on elements.".

It looks cool and it makes sense to have it.

Image

Why are you so against it? I know what I'm talking about and making a career out of it, it's not bad practice to make your own elements and is necessary to make your own attributes for a lot of things.

I do think it is cool but I also think it's nice to just have an addition to the existing [code].


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Koya1479846942636005

Board footer

Powered by FluxBB

[ Started around 1711639870.2491 - Generated in 0.051 seconds, 12 queries executed - Memory usage: 1.55 MiB (Peak: 1.71 MiB) ]