5

I was wondering why the chosen styling data is provided though the API. It makes sense to provide it, but I feel like we are only getting part of the information.

"styling": {
    "link_color": {
      "description": "color of links, as a CSS style color value",
      "values": "string",
      "optional": false
    },
    "tag_foreground_color": {
      "description": "foreground color of tags, as a CSS style color value",
      "values": "string",
      "optional": false
    },
    "tag_background_color": {
      "description": "background/fill color of tags, as a CSS style color value",
      "values": "string",
      "optional": false
    }
}

It seems to me that we should be provided with stuff like background color, accepted answer color, no answer color, border styles, etc. Or, why provide any style information at all?

2
  • Well, remember the rules: "Don't copy the look and feel..." so the more color info they provide, the more it will look like the real thing. Commented Jul 9, 2010 at 19:02
  • @George Right, but why do they provide any info at all then? Commented Jul 9, 2010 at 19:17

1 Answer 1

3

This feature came about after some internal discussion.

The gist of it was, what's the bare minimum you need to make a question link look like it belongs to a given site? link_color, tag_foreground_color, and tag_background_color are what came out of that discussion.

The reason for restricting to just that subset of a site is that, as George Edison pointed out, we don't want people copying the look and feel of a site wholesale.

5
  • So, you decided that this was enough info to determine the site a link belongs to? Where do tags fit into that? Commented Jul 9, 2010 at 19:41
  • @jjnguy - we assumed the common case when linking a question would be to display its title (link_color) and the tags on it (tag_foreground_color and tag_background_color). Commented Jul 9, 2010 at 19:45
  • ...and this is not considered copying the look and feel? Commented Jul 9, 2010 at 19:57
  • 1
    @George - using the colors the API provides to style question links and tags is A-OK. Commented Jul 9, 2010 at 20:18
  • 1
    Great! I just switched all my stuff to 1.0 when I saw that my stuff stopped responding. Commented Jul 9, 2010 at 20:23

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.