List for cgit developers and users
 help / color / mirror / Atom feed
* A less invasive cgit.css that works in an embedded environment?
@ 2011-08-27  2:22 delan
  2011-08-28 13:53 ` cgit
  0 siblings, 1 reply; 4+ messages in thread
From: delan @ 2011-08-27  2:22 UTC (permalink / raw)


Lukas Fleischer wrote:
 > Why don't you just embed the whole cgit body in a container and use
 > selectors [1], [2] to make the cgit styles match elements of the cgit
 > interface only?
 >
 > [1] http://www.w3.org/TR/CSS21/selector.html#descendant-selectors
 > [2] http://www.w3.org/TR/CSS21/selector.html#child-selectors

Could you please elaborate on what you are suggesting? I'm not quite 
sure that I understand what I should do.

The way I am seeing it so far, as the only output of cgit in embedded 
mode is <div id="cgit">...</div>, so it is already in a container.

Should I just change all of the selectors in my copy of cgit.css to 
prepend #cgit?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* A less invasive cgit.css that works in an embedded environment?
  2011-08-27  2:22 A less invasive cgit.css that works in an embedded environment? delan
@ 2011-08-28 13:53 ` cgit
  0 siblings, 0 replies; 4+ messages in thread
From: cgit @ 2011-08-28 13:53 UTC (permalink / raw)


On Sat, Aug 27, 2011 at 10:22:29AM +0800, Delan Azabani wrote:
> Lukas Fleischer wrote:
> > Why don't you just embed the whole cgit body in a container and use
> > selectors [1], [2] to make the cgit styles match elements of the cgit
> > interface only?
> >
> > [1] http://www.w3.org/TR/CSS21/selector.html#descendant-selectors
> > [2] http://www.w3.org/TR/CSS21/selector.html#child-selectors
> 
> Could you please elaborate on what you are suggesting? I'm not quite
> sure that I understand what I should do.
> 
> The way I am seeing it so far, as the only output of cgit in
> embedded mode is <div id="cgit">...</div>, so it is already in a
> container.
> 
> Should I just change all of the selectors in my copy of cgit.css to
> prepend #cgit?

Yes.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* A less invasive cgit.css that works in an embedded environment?
  2011-08-22 12:47 delan
@ 2011-08-26 15:28 ` cgit
  0 siblings, 0 replies; 4+ messages in thread
From: cgit @ 2011-08-26 15:28 UTC (permalink / raw)


On Mon, Aug 22, 2011 at 08:47:47PM +0800, Delan Azabani wrote:
> Hi,
> 
> I've been a long time user of cgit, but only recently have I
> attempted to integrate cgit into the style of the rest of my
> website. I have had some success so far, with the following
> configuration:
> 
> 	snapshots=tar.xz tar.bz2 tar.gz tar zip
> 	scan-path=/var/git
> 	clone-prefix=git://azabani.com
> 	cache-root=/var/cache/cgit
> 	noheader=1
> 	embedded=1
> 	header=/var/www/head
> 	footer=/var/www/foot
> 
> Specifically, the last four options are what I've used, and this
> works quite well, but styling is an issue.
> 
> If I include cgit.css in /var/www/head, the styles in the file break
> other parts of my website, including non-cgit pages, but more
> importantly, the template itself, because the selectors being used
> are very general.
> 
> I am wondering, is it possible to prepend '#cgit ' to all of the
> selectors in cgit.css so that it can work well in an embedded
> environment?

Why don't you just embed the whole cgit body in a container and use
selectors [1], [2] to make the cgit styles match elements of the cgit
interface only?

[1] http://www.w3.org/TR/CSS21/selector.html#descendant-selectors
[2] http://www.w3.org/TR/CSS21/selector.html#child-selectors




^ permalink raw reply	[flat|nested] 4+ messages in thread

* A less invasive cgit.css that works in an embedded environment?
@ 2011-08-22 12:47 delan
  2011-08-26 15:28 ` cgit
  0 siblings, 1 reply; 4+ messages in thread
From: delan @ 2011-08-22 12:47 UTC (permalink / raw)


Hi,

I've been a long time user of cgit, but only recently have I attempted 
to integrate cgit into the style of the rest of my website. I have had 
some success so far, with the following configuration:

	snapshots=tar.xz tar.bz2 tar.gz tar zip
	scan-path=/var/git
	clone-prefix=git://azabani.com
	cache-root=/var/cache/cgit
	noheader=1
	embedded=1
	header=/var/www/head
	footer=/var/www/foot

Specifically, the last four options are what I've used, and this works 
quite well, but styling is an issue.

If I include cgit.css in /var/www/head, the styles in the file break 
other parts of my website, including non-cgit pages, but more 
importantly, the template itself, because the selectors being used are 
very general.

I am wondering, is it possible to prepend '#cgit ' to all of the 
selectors in cgit.css so that it can work well in an embedded environment?

Thanks,
Delan Azabani




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-28 13:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-27  2:22 A less invasive cgit.css that works in an embedded environment? delan
2011-08-28 13:53 ` cgit
  -- strict thread matches above, loose matches on Subject: below --
2011-08-22 12:47 delan
2011-08-26 15:28 ` cgit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).