You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <bl...@incubator.apache.org> on 2013/02/28 16:59:18 UTC

[Apache Bloodhound] #420: Improved styling for `inline code`

#420: Improved styling for `inline code`
-------------------------+--------------------
 Reporter:  rjollos      |      Owner:  nobody
     Type:  enhancement  |     Status:  new
 Priority:  minor        |  Milestone:
Component:  ui design    |    Version:
 Keywords:               |
-------------------------+--------------------
 trac:#10592 changed the style for inline code to have a grey background,
 just prior to the 1.0 release. Using the example provided in that ticket,
 Bloodhound could benefit from improved styling for inline code:

 ----

 It is `very hard` to search for `inline` code `in` Trac wiki. It would be
 extremely handy if default style for inline code `snippets` was rendered
 on the same gray background as `code` blocks by default. Much like
 `stackoverflow` and `github` do.

 ----

 We may not necessarily want to copy the CSS from Trac, but perhaps come up
 with our own way of making the inline code style stand-out better.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+--------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  ui design    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by rjollos):

 (In [1451726])

 Refs #420: Replace `tt` tags with `code` tags in Bloodhound templates (3
 instances).

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:6>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+-----------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  closed
  Priority:  minor        |  Milestone:  Release 5
 Component:  ui design    |    Version:
Resolution:  fixed        |   Keywords:
--------------------------+-----------------------
Changes (by rjollos):

 * status:  new => closed
 * resolution:   => fixed
 * milestone:   => Release 5


Comment:

 Patch submitted to Trac in trac:#11094.

 (In [1452153])

 Refs #420: Copied styling for `code` tags from `bootstrap.css` to
 `bloodhound.css` and applied to `tt` tags.

 ----

 Inclusion of the patch in Trac won't immediately affect Bloodhound because
 the styling for `code` elements has been copied to `tt` elements. `code`
 tags should be used in Bloodhound templates going forward, and when the
 patch is applied to Trac, hopefully plugins will follow by using `code`
 tags rather than `tt` tags. Either way, I anticipate that the code
 committed in [1452153] will need to be left in place for a long while.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:7>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+--------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  ui design    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by olemis):

 Replying to [ticket:420 rjollos]:
 > trac:#10592 changed the style for inline code to have a grey background,
 just prior to the 1.0 release.
 >
 [...]

 This looks like good stuff to me .

 > We may not necessarily want to copy the CSS from Trac, but perhaps come
 up with our own way of making the inline code style stand-out better.

 We shall use [http://twitter.github.com/bootstrap/base-css.html#code
 Bootstrap inline code] styling. it's been used before in TracIni to render
 the list of config options .

 IMO in Bloodhound we should have an equivalent to labels provided by
 trachacks:TracWikiExtras . The current approach to insert `<span
 class="label label-*" />` tags is really complicated and this should
 simple stuff

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+--------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  ui design    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by rjollos):

 Replying to [comment:2 rjollos]:
 > Is modification of the Trac source code the only way to accomplish this?

 Oh, the other way to accomplish this (at least for the short term) is to
 copy the CSS for `code` elements from `bootstrap.css` to `bloodhound.css`.
 So a patch such as [attachment:t420.patch] seems to work. Or is there some
 way to directly apply the styles defined for `code` elements to `tt`
 elements?

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+-----------------------
  Reporter:  rjollos      |      Owner:  rjollos
      Type:  enhancement  |     Status:  closed
  Priority:  minor        |  Milestone:  Release 5
 Component:  ui design    |    Version:
Resolution:  fixed        |   Keywords:
--------------------------+-----------------------
Changes (by rjollos):

 * owner:  nobody => rjollos


-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:8>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+--------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  ui design    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by rjollos):

 Ticket has been opened in Trac, trac:#11094. If I get a positive response,
 I'll commit a patch and see if they will include it in
 trac:milestone:1.0.2.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:5>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Matevž Bradač <ma...@gmail.com>.
On 2. Mar, 2013, at 0:02, Ryan Ollos wrote:

> On Fri, Mar 1, 2013 at 2:28 PM, Matevž Bradač <ma...@gmail.com> wrote:
> 
>> 
>> On 1. Mar, 2013, at 21:47, Olemis Lang wrote:
>> 
>>> On 3/1/13, Gary Martin <ga...@wandisco.com> wrote:
>>> [...]
>>>> 
>>>> There are a lot of potential ways of doing this. I am not keen on
>>>> copying the CSS across if we want to be sticking to whatever bootstrap
>>>> provides. That leaves swapping tags, which itself can probably be done
>>>> in three or more ways, or copying the styles on the client side with js.
>>>> 
>>> 
>>> I was initially thinking of introducing (overriding) these in
>>> bloodhound.css rather than modifying bootstrap.css
>> 
>> I think that's what Gary was referring to as well. But overriding things
>> in bloodhound.css quickly becomes quite cumbersome, as there is no way
>> to express "inheritance" of one tag's properties from another tag and
>> then overriding some of them (you have to copy and paste the whole style).
>> 
>> However - bootstrap is built with LESS (http://lesscss.org/), which
>> extends
>> the CSS with variables etc. which would allow just that (via mixins).
>> 
> 
> Oh, very cool, thank you for sharing that.
> 
> 
>> Maybe we could adopt using LESS for building our custom bootstrap.css in
>> the future?
>> 
> 
> Do you mean, build bloodhound.css with LESS?

Yes, if it comes in handy. For example, if we ever want to change the default
styling, it may be easier to do it with LESS than changing the CSS. Especially
since there are some elements (e.g. date picker) which are not bootstrap-based,
but use a bootstrap-like styling (copy & pasted CSS).


Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Andrej Golcov <an...@digiverse.si>.
Sorry, it looks like I post to the wrong thread.
The post was actually intended to thread on #411 as answer to Olemis
on result of runnit unit-tests.

Cheers, Andrej

On 6 March 2013 20:46, Ryan Ollos <ry...@wandisco.com> wrote:
> On Wed, Mar 6, 2013 at 8:59 AM, Andrej Golcov <an...@digiverse.si> wrote:
>
>> I ran {{{$python setup.py test}}} and have got the same number of
>> errors on clean and patched version:
>>
>
> I'm seeing the same result, but I'm not sure about the possible connection
> to ticket #420. Do you have some hints as to how this could be connected
> with #420, or was this comment possibly intended to be associated with a
> different thread?

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Ryan Ollos <ry...@wandisco.com>.
On Wed, Mar 6, 2013 at 8:59 AM, Andrej Golcov <an...@digiverse.si> wrote:

> I ran {{{$python setup.py test}}} and have got the same number of
> errors on clean and patched version:
>

I'm seeing the same result, but I'm not sure about the possible connection
to ticket #420. Do you have some hints as to how this could be connected
with #420, or was this comment possibly intended to be associated with a
different thread?

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Andrej Golcov <an...@digiverse.si>.
I ran {{{$python setup.py test}}} and have got the same number of
errors on clean and patched version:

======================================================================
ERROR: test_action_with_state_change
(trac.ticket.tests.batch.BatchModifyTestCase)
Actions can have change status.
======================================================================
ERROR: test_add_batchmod_value_data_from_request
(trac.ticket.tests.batch.BatchModifyTestCase)
======================================================================
ERROR: test_save_values (trac.ticket.tests.batch.BatchModifyTestCase)
Changed values are saved to all tickets.
======================================================================
FAIL: test_rss_conversion
(trac.ticket.tests.conversion.TicketConversionTestCase)
======================================================================
FAIL: test_unicode_branches
(tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase)
======================================================================
FAIL: test_unicode_filename
(tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase)
======================================================================
FAIL: test_unicode_tags
(tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase)

Ran 1207 tests in 17.610s

FAILED (failures=4, errors=3)

BTW, is there any other way to run Trac tests with no failures?

Cheers, Andrej

On 4 March 2013 00:28, Ryan Ollos <ry...@wandisco.com> wrote:
> On Sun, Mar 3, 2013 at 12:41 PM, Olemis Lang <ol...@gmail.com> wrote:
>
>> For instance afaicr the initial implementation of .btn-link class was
>> included inside @group Bootstrap extensions . Few versions ahead
>> Twitter Bootstrap committed those changes to upstream , so we erased
>> our own copy.
>
>
> Thank you for the pointers. Please let me know if my commit doesn't
> accomplish what you suggested.

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Ryan Ollos <ry...@wandisco.com>.
On Sun, Mar 3, 2013 at 12:41 PM, Olemis Lang <ol...@gmail.com> wrote:

> For instance afaicr the initial implementation of .btn-link class was
> included inside @group Bootstrap extensions . Few versions ahead
> Twitter Bootstrap committed those changes to upstream , so we erased
> our own copy.


Thank you for the pointers. Please let me know if my commit doesn't
accomplish what you suggested.

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Olemis Lang <ol...@gmail.com>.
For instance afaicr the initial implementation of .btn-link class was
included inside @group Bootstrap extensions . Few versions ahead
Twitter Bootstrap committed those changes to upstream , so we erased
our own copy . If u want to reuse the same group and/or propose your
changes to upstream I'd be ok with doing both .

On 3/3/13, Olemis Lang <ol...@gmail.com> wrote:
> On 3/2/13, Ryan Ollos <ry...@wandisco.com> wrote:
> [...]
>>
>> So I will proceed like this:
>>  (1) Push a patch to the Trac source code.
>>  (2) Patch the version of Trac in the BH repository, resolving this issue
>> prior to Release 5.
>>  (3) Copy and paste the CSS from bootstrap.css to bloodhound.css for
>> `code`
>> tags and apply it to `tt` tags.
>>
>
> AFAICT , please , just make sure of including these inside a @group so
> that , *if* Matevz suggestion is adopted later then we'll be able to
> locate such patches easily ... and maybe translate them using LESS
>
> --
> Regards,
>
> Olemis.
>


-- 
Regards,

Olemis.

Apache™ Bloodhound contributor
http://issues.apache.org/bloodhound

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Olemis Lang <ol...@gmail.com>.
On 3/2/13, Ryan Ollos <ry...@wandisco.com> wrote:
[...]
>
> So I will proceed like this:
>  (1) Push a patch to the Trac source code.
>  (2) Patch the version of Trac in the BH repository, resolving this issue
> prior to Release 5.
>  (3) Copy and paste the CSS from bootstrap.css to bloodhound.css for `code`
> tags and apply it to `tt` tags.
>

AFAICT , please , just make sure of including these inside a @group so
that , *if* Matevz suggestion is adopted later then we'll be able to
locate such patches easily ... and maybe translate them using LESS

-- 
Regards,

Olemis.

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Ryan Ollos <ry...@wandisco.com>.
On Sat, Mar 2, 2013 at 1:48 PM, Matevž Bradač <ma...@gmail.com> wrote:

>
> On 2. Mar, 2013, at 9:48, Olemis Lang wrote:
>
> > On 3/1/13, Ryan Ollos <ry...@wandisco.com> wrote:
> >> On Fri, Mar 1, 2013 at 2:28 PM, Matevž Bradač <ma...@gmail.com>
> wrote:
> >>> On 1. Mar, 2013, at 21:47, Olemis Lang wrote:
> >>>> On 3/1/13, Gary Martin <ga...@wandisco.com> wrote:
> >>>> [...]
> >>>>>
> >>>>> There are a lot of potential ways of doing this. I am not keen on
> >>>>> copying the CSS across if we want to be sticking to whatever
> bootstrap
> >>>>> provides. That leaves swapping tags, which itself can probably be
> done
> >>>>> in three or more ways, or copying the styles on the client side with
> >>>>> js.
> >>>>>
> >>>>
> >>>> I was initially thinking of introducing (overriding) these in
> >>>> bloodhound.css rather than modifying bootstrap.css
> >>>
> >>> I think that's what Gary was referring to as well.
> >
> > yeah ... my last comment was jftr ;)
> >
> >>> But overriding things
> >>> in bloodhound.css quickly becomes quite cumbersome, as there is no way
> >>> to express "inheritance" of one tag's properties from another tag and
> >>> then overriding some of them (you have to copy and paste the whole
> >>> style).
> >>>
> >
> > +1
> >
> >>> However - bootstrap is built with LESS (http://lesscss.org/), which
> >>> extends
> >>> the CSS with variables etc. which would allow just that (via mixins).
> >>>
> >>
> >> Oh, very cool, thank you for sharing that.
> >>
> >
> > that's cool
> >
> >>> Maybe we could adopt using LESS for building our custom bootstrap.css
> in
> >>> the future?
> >>>
> >>
> >> Do you mean, build bloodhound.css with LESS?
> >>
> >
> > I suppose that's what Matevz meant in first place . If so , that's
> > interesting . IMO we really have to assess the benefits vs the
> > drawbacks . In principle I wouldn't mind *if* we were in need of
> > relying upon LESS quite often and in considerable amounts (e.g. like
> > Bootstrap ;) . Maybe we end-up building a space rocket to kill a
> > single ant .
>
> +1, it's more of an "if" thing.


Yes, I also think that Olemis put this issue into perspective quite well.


> Currently bootstrap defaults suffice,
> there is some CSS copy&pasting, but it's not really overwhelming.
>

Agreed.


> If we ever want to change the default styling, or even enable the users
> to do so, it may be a thing to consider.
>

The primary goal of this ticket will be accomplished by a patch to the Trac
source code (possibly a temporary patch to the BH copy of Trac, and
inclusion of the change in the 1.0.2 release of Trac). The issue of how to
deal with `tt` elements provided by plugins is not a very important issue
to begin with --at this stage of the development of Bloodhound--, and it's
certainly not worth a major effort to just solve a small CSS
maintainability issue.

So I will proceed like this:
 (1) Push a patch to the Trac source code.
 (2) Patch the version of Trac in the BH repository, resolving this issue
prior to Release 5.
 (3) Copy and paste the CSS from bootstrap.css to bloodhound.css for `code`
tags and apply it to `tt` tags.

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Matevž Bradač <ma...@gmail.com>.
On 2. Mar, 2013, at 9:48, Olemis Lang wrote:

> On 3/1/13, Ryan Ollos <ry...@wandisco.com> wrote:
>> On Fri, Mar 1, 2013 at 2:28 PM, Matevž Bradač <ma...@gmail.com> wrote:
>>> On 1. Mar, 2013, at 21:47, Olemis Lang wrote:
>>>> On 3/1/13, Gary Martin <ga...@wandisco.com> wrote:
>>>> [...]
>>>>> 
>>>>> There are a lot of potential ways of doing this. I am not keen on
>>>>> copying the CSS across if we want to be sticking to whatever bootstrap
>>>>> provides. That leaves swapping tags, which itself can probably be done
>>>>> in three or more ways, or copying the styles on the client side with
>>>>> js.
>>>>> 
>>>> 
>>>> I was initially thinking of introducing (overriding) these in
>>>> bloodhound.css rather than modifying bootstrap.css
>>> 
>>> I think that's what Gary was referring to as well.
> 
> yeah ... my last comment was jftr ;)
> 
>>> But overriding things
>>> in bloodhound.css quickly becomes quite cumbersome, as there is no way
>>> to express "inheritance" of one tag's properties from another tag and
>>> then overriding some of them (you have to copy and paste the whole
>>> style).
>>> 
> 
> +1
> 
>>> However - bootstrap is built with LESS (http://lesscss.org/), which
>>> extends
>>> the CSS with variables etc. which would allow just that (via mixins).
>>> 
>> 
>> Oh, very cool, thank you for sharing that.
>> 
> 
> that's cool
> 
>>> Maybe we could adopt using LESS for building our custom bootstrap.css in
>>> the future?
>>> 
>> 
>> Do you mean, build bloodhound.css with LESS?
>> 
> 
> I suppose that's what Matevz meant in first place . If so , that's
> interesting . IMO we really have to assess the benefits vs the
> drawbacks . In principle I wouldn't mind *if* we were in need of
> relying upon LESS quite often and in considerable amounts (e.g. like
> Bootstrap ;) . Maybe we end-up building a space rocket to kill a
> single ant .

+1, it's more of an "if" thing. Currently bootstrap defaults suffice,
there is some CSS copy&pasting, but it's not really overwhelming.
If we ever want to change the default styling, or even enable the users
to do so, it may be a thing to consider.

> -- 
> Regards,
> 
> Olemis.


Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Olemis Lang <ol...@gmail.com>.
On 3/1/13, Ryan Ollos <ry...@wandisco.com> wrote:
> On Fri, Mar 1, 2013 at 2:28 PM, Matevž Bradač <ma...@gmail.com> wrote:
>> On 1. Mar, 2013, at 21:47, Olemis Lang wrote:
>> > On 3/1/13, Gary Martin <ga...@wandisco.com> wrote:
>> > [...]
>> >>
>> >> There are a lot of potential ways of doing this. I am not keen on
>> >> copying the CSS across if we want to be sticking to whatever bootstrap
>> >> provides. That leaves swapping tags, which itself can probably be done
>> >> in three or more ways, or copying the styles on the client side with
>> >> js.
>> >>
>> >
>> > I was initially thinking of introducing (overriding) these in
>> > bloodhound.css rather than modifying bootstrap.css
>>
>> I think that's what Gary was referring to as well.

yeah ... my last comment was jftr ;)

>> But overriding things
>> in bloodhound.css quickly becomes quite cumbersome, as there is no way
>> to express "inheritance" of one tag's properties from another tag and
>> then overriding some of them (you have to copy and paste the whole
>> style).
>>

+1

>> However - bootstrap is built with LESS (http://lesscss.org/), which
>> extends
>> the CSS with variables etc. which would allow just that (via mixins).
>>
>
> Oh, very cool, thank you for sharing that.
>

that's cool

>> Maybe we could adopt using LESS for building our custom bootstrap.css in
>> the future?
>>
>
> Do you mean, build bloodhound.css with LESS?
>

I suppose that's what Matevz meant in first place . If so , that's
interesting . IMO we really have to assess the benefits vs the
drawbacks . In principle I wouldn't mind *if* we were in need of
relying upon LESS quite often and in considerable amounts (e.g. like
Bootstrap ;) . Maybe we end-up building a space rocket to kill a
single ant .

-- 
Regards,

Olemis.

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Ryan Ollos <ry...@wandisco.com>.
On Fri, Mar 1, 2013 at 2:28 PM, Matevž Bradač <ma...@gmail.com> wrote:

>
> On 1. Mar, 2013, at 21:47, Olemis Lang wrote:
>
> > On 3/1/13, Gary Martin <ga...@wandisco.com> wrote:
> > [...]
> >>
> >> There are a lot of potential ways of doing this. I am not keen on
> >> copying the CSS across if we want to be sticking to whatever bootstrap
> >> provides. That leaves swapping tags, which itself can probably be done
> >> in three or more ways, or copying the styles on the client side with js.
> >>
> >
> > I was initially thinking of introducing (overriding) these in
> > bloodhound.css rather than modifying bootstrap.css
>
> I think that's what Gary was referring to as well. But overriding things
> in bloodhound.css quickly becomes quite cumbersome, as there is no way
> to express "inheritance" of one tag's properties from another tag and
> then overriding some of them (you have to copy and paste the whole style).
>
> However - bootstrap is built with LESS (http://lesscss.org/), which
> extends
> the CSS with variables etc. which would allow just that (via mixins).
>

Oh, very cool, thank you for sharing that.


> Maybe we could adopt using LESS for building our custom bootstrap.css in
> the future?
>

Do you mean, build bloodhound.css with LESS?

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Matevž Bradač <ma...@gmail.com>.
On 1. Mar, 2013, at 21:47, Olemis Lang wrote:

> On 3/1/13, Gary Martin <ga...@wandisco.com> wrote:
> [...]
>> 
>> There are a lot of potential ways of doing this. I am not keen on
>> copying the CSS across if we want to be sticking to whatever bootstrap
>> provides. That leaves swapping tags, which itself can probably be done
>> in three or more ways, or copying the styles on the client side with js.
>> 
> 
> I was initially thinking of introducing (overriding) these in
> bloodhound.css rather than modifying bootstrap.css

I think that's what Gary was referring to as well. But overriding things
in bloodhound.css quickly becomes quite cumbersome, as there is no way
to express "inheritance" of one tag's properties from another tag and
then overriding some of them (you have to copy and paste the whole style).

However - bootstrap is built with LESS (http://lesscss.org/), which extends
the CSS with variables etc. which would allow just that (via mixins).
Maybe we could adopt using LESS for building our custom bootstrap.css in the future?

> 
>> I assume that we are expecting to always show the bootstrap styling for
>> all cases as long as the theme is active.
>> 
> 
> +1
> 
> -- 
> Regards,
> 
> Olemis.


Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Olemis Lang <ol...@gmail.com>.
On 3/1/13, Gary Martin <ga...@wandisco.com> wrote:
[...]
>
> There are a lot of potential ways of doing this. I am not keen on
> copying the CSS across if we want to be sticking to whatever bootstrap
> provides. That leaves swapping tags, which itself can probably be done
> in three or more ways, or copying the styles on the client side with js.
>

I was initially thinking of introducing (overriding) these in
bloodhound.css rather than modifying bootstrap.css

> I assume that we are expecting to always show the bootstrap styling for
> all cases as long as the theme is active.
>

+1

-- 
Regards,

Olemis.

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Gary Martin <ga...@wandisco.com>.
On 01/03/13 16:08, Ryan Ollos wrote:
> On Fri, Mar 1, 2013 at 7:51 AM, Ryan Ollos <ry...@wandisco.com> wrote:
>
>> On Fri, Mar 1, 2013 at 7:43 AM, Olemis Lang <ol...@gmail.com> wrote:
>>
>>> On 2/28/13, Apache Bloodhound <bl...@incubator.apache.org>
>>> wrote:
>>>> #420: Improved styling for `inline code`
>>>> --------------------------+--------------------
>>>>    Reporter:  rjollos      |      Owner:  nobody
>>>>        Type:  enhancement  |     Status:  new
>>>>    Priority:  minor        |  Milestone:
>>>>   Component:  ui design    |    Version:
>>>> Resolution:               |   Keywords:
>>>> --------------------------+--------------------
>>>>
>>>> Comment (by rjollos):
>>>>
>>> []...
>>>>   [attachment:replace_tt_tags_with_code_tags.patch] seems to accomplish
>>> the
>>>>   change in Trac (does not include changes to unit tests, which would be
>>>>   required for a proper patch).
>>>>
>>> yes, please . if doing so that is especially important now that we
>>> finally stabilized MP test suite .
>>>
>>> However , I guess we better change tt css rules because , even if we
>>> replace instances of tag.tt in Trac core , it will be a huge challenge
>>> to get the same thing done for plugins , Genshi streams , Markup , etc
>>> ...
>>>
>>> what d'u think ?
>>>
>> That is a really good point. So we need to have the Bootstrap CSS that
>> applies to code tags apply to the tt tags as well to cover the case of
>> plugins? Is there a cleaner way to accomplish that in CSS than my cut and
>> paste of the CSS for the code tags into Bloodhound.css? I was wondering if
>> there was a, perhaps one-line, way in CSS to say "apply all of the styles
>> for code tags to tt tags".
>>
> Discussing we Gary has led me to think the best solution might be to just
> add a bit of code in theme.filter_stream that replaces `tt` tags with
> `code` tags. Does that sound good?
>

There are a lot of potential ways of doing this. I am not keen on 
copying the CSS across if we want to be sticking to whatever bootstrap 
provides. That leaves swapping tags, which itself can probably be done 
in three or more ways, or copying the styles on the client side with js.

I assume that we are expecting to always show the bootstrap styling for 
all cases as long as the theme is active.

Cheers,
     Gary

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Ryan Ollos <ry...@wandisco.com>.
On Fri, Mar 1, 2013 at 7:51 AM, Ryan Ollos <ry...@wandisco.com> wrote:

> On Fri, Mar 1, 2013 at 7:43 AM, Olemis Lang <ol...@gmail.com> wrote:
>
>> On 2/28/13, Apache Bloodhound <bl...@incubator.apache.org>
>> wrote:
>> > #420: Improved styling for `inline code`
>> > --------------------------+--------------------
>> >   Reporter:  rjollos      |      Owner:  nobody
>> >       Type:  enhancement  |     Status:  new
>> >   Priority:  minor        |  Milestone:
>> >  Component:  ui design    |    Version:
>> > Resolution:               |   Keywords:
>> > --------------------------+--------------------
>> >
>> > Comment (by rjollos):
>> >
>> []...
>> >
>> >  [attachment:replace_tt_tags_with_code_tags.patch] seems to accomplish
>> the
>> >  change in Trac (does not include changes to unit tests, which would be
>> >  required for a proper patch).
>> >
>>
>> yes, please . if doing so that is especially important now that we
>> finally stabilized MP test suite .
>>
>> However , I guess we better change tt css rules because , even if we
>> replace instances of tag.tt in Trac core , it will be a huge challenge
>> to get the same thing done for plugins , Genshi streams , Markup , etc
>> ...
>>
>> what d'u think ?
>>
>
> That is a really good point. So we need to have the Bootstrap CSS that
> applies to code tags apply to the tt tags as well to cover the case of
> plugins? Is there a cleaner way to accomplish that in CSS than my cut and
> paste of the CSS for the code tags into Bloodhound.css? I was wondering if
> there was a, perhaps one-line, way in CSS to say "apply all of the styles
> for code tags to tt tags".
>

Discussing we Gary has led me to think the best solution might be to just
add a bit of code in theme.filter_stream that replaces `tt` tags with
`code` tags. Does that sound good?

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Ryan Ollos <ry...@wandisco.com>.
On Fri, Mar 1, 2013 at 7:43 AM, Olemis Lang <ol...@gmail.com> wrote:

> On 2/28/13, Apache Bloodhound <bl...@incubator.apache.org> wrote:
> > #420: Improved styling for `inline code`
> > --------------------------+--------------------
> >   Reporter:  rjollos      |      Owner:  nobody
> >       Type:  enhancement  |     Status:  new
> >   Priority:  minor        |  Milestone:
> >  Component:  ui design    |    Version:
> > Resolution:               |   Keywords:
> > --------------------------+--------------------
> >
> > Comment (by rjollos):
> >
> []...
> >
> >  [attachment:replace_tt_tags_with_code_tags.patch] seems to accomplish
> the
> >  change in Trac (does not include changes to unit tests, which would be
> >  required for a proper patch).
> >
>
> yes, please . if doing so that is especially important now that we
> finally stabilized MP test suite .
>
> However , I guess we better change tt css rules because , even if we
> replace instances of tag.tt in Trac core , it will be a huge challenge
> to get the same thing done for plugins , Genshi streams , Markup , etc
> ...
>
> what d'u think ?
>

That is a really good point. So we need to have the Bootstrap CSS that
applies to code tags apply to the tt tags as well to cover the case of
plugins? Is there a cleaner way to accomplish that in CSS than my cut and
paste of the CSS for the code tags into Bloodhound.css? I was wondering if
there was a, perhaps one-line, way in CSS to say "apply all of the styles
for code tags to tt tags".

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Olemis Lang <ol...@gmail.com>.
On 2/28/13, Apache Bloodhound <bl...@incubator.apache.org> wrote:
> #420: Improved styling for `inline code`
> --------------------------+--------------------
>   Reporter:  rjollos      |      Owner:  nobody
>       Type:  enhancement  |     Status:  new
>   Priority:  minor        |  Milestone:
>  Component:  ui design    |    Version:
> Resolution:               |   Keywords:
> --------------------------+--------------------
>
> Comment (by rjollos):
>
[]...
>
>  [attachment:replace_tt_tags_with_code_tags.patch] seems to accomplish the
>  change in Trac (does not include changes to unit tests, which would be
>  required for a proper patch).
>

yes, please . if doing so that is especially important now that we
finally stabilized MP test suite .

However , I guess we better change tt css rules because , even if we
replace instances of tag.tt in Trac core , it will be a huge challenge
to get the same thing done for plugins , Genshi streams , Markup , etc
...

what d'u think ?

-- 
Regards,

Olemis.

Apache™ Bloodhound contributor
http://issues.apache.org/bloodhound

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+--------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  ui design    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by rjollos):

 Replying to [comment:1 olemis]:
 > We shall use [http://twitter.github.com/bootstrap/base-css.html#code
 Bootstrap inline code] styling. it's been used before in TracIni to render
 the list of config options .

 I tested the following patch, which requires changing
 [/browser/tags/trac-1.0.1/trac/wiki/formatter.py?marks=535,538#L533 two
 lines] in the Trac source code:

 {{{
 #!patch
 Index: trac/trac/wiki/formatter.py
 ===================================================================
 --- trac/trac/wiki/formatter.py (revision 1451214)
 +++ trac/trac/wiki/formatter.py (working copy)
 @@ -532,10 +532,10 @@
          return self._indirect_tag_handler(match, 'MM_SUPERSCRIPT')

      def _inlinecode_formatter(self, match, fullmatch):
 -        return tag.tt(fullmatch.group('inline'))
 +        return tag.code(fullmatch.group('inline'))

      def _inlinecode2_formatter(self, match, fullmatch):
 -        return tag.tt(fullmatch.group('inline2'))
 +        return tag.code(fullmatch.group('inline2'))

      # pre-0.12 public API (no longer used by Trac itself but kept for
 plugins)
 }}}

 Overall I think it produces a nice result.

 Is modification of the Trac source code the only way to accomplish this?
 The `tt` tag is [http://www.w3schools.com/tags/tag_tt.asp not supported in
 HTML5]. Do you have any thoughts on whether a patch would be well received
 in Trac at this point in time? Specifically, can you think of any reason
 why Trac would not want to move to the HTML5-valid `code` tags?

 [attachment:replace_tt_tags_with_code_tags.patch] seems to accomplish the
 change in Trac (does not include changes to unit tests, which would be
 required for a proper patch).

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #420: Improved styling for `inline code`

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#420: Improved styling for `inline code`
--------------------------+--------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  ui design    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by rjollos):

 Replying to [comment:2 rjollos]:
 > [attachment:replace_tt_tags_with_code_tags-2.patch] seems to accomplish
 the change in Trac (does not include changes to unit tests, which would be
 required for a proper patch).

 gjm noted that I'll also need to replace some instances of
 `genshi.builder`s `tag.tt` with `tag.code`.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker