Re: [Wikitech-l] How to add custom styles to a page?
On Monday 18 September 2017 08:54 PM, Brad Jorsch (Anomie) wrote: On Sat, Sep 16, 2017 at 5:24 PM, Gergo Tisza wrote: You could also just put it into User:Kaartic/common.css and wrap it in a .page-User_Kaartic selector, that is less restrictive. Although that will only apply the CSS for you while you're logged in, no one else will see it. Yeah, that was the reason I wanted to know if there was some other way to add custom styles to a page. I find it useless to have styles (e.g., styles needed by layout-grid) that make things look nice only to me but ugly for others. --- Kaartic ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] How to add custom styles to a page?
On Sat, 2017-09-16 at 10:46 -0400, Brian Wolff wrote: > Im assuming here that you cannot just edit mediawiki:common.css > > That's right. > What you are looking for is TemplateStyles. This is not enabled on english > wikipedia yet, but should be coming there soon (I think). It would allow > you to use @media styles for your pages. See > https://www.mediawiki.org/wiki/Help:TemplateStyles for more details. > > Templatestyles does not let you use css variables (the properties starting > with -- and the var() css function), but the example css you used could > easily be rewritten to not use that feature. > Thanks, that sounds useful. IIRC, I have to create a template for the 'layout grid' and add custom styles to that using TemplateStyles and use that template on my user page. Sounds like a lot of work. -- Kaartic ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] How to add custom styles to a page?
On Sat, Sep 16, 2017 at 5:24 PM, Gergo Tisza wrote: > On Sat, Sep 16, 2017 at 7:46 AM, Brian Wolff wrote: > > > What you are looking for is TemplateStyles. This is not enabled on > english > > wikipedia yet, but should be coming there soon (I think). It would allow > > you to use @media styles for your pages. See > > https://www.mediawiki.org/wiki/Help:TemplateStyles for more details. > > > > Templatestyles does not let you use css variables (the properties > starting > > with -- and the var() css function), but the example css you used could > > easily be rewritten to not use that feature. > > > > You could also just put it into User:Kaartic/common.css and wrap it in a > .page-User_Kaartic selector, that is less restrictive. > Although that will only apply the CSS for you while you're logged in, no one else will see it. -- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] How to add custom styles to a page?
On Sat, Sep 16, 2017 at 7:46 AM, Brian Wolff wrote: > What you are looking for is TemplateStyles. This is not enabled on english > wikipedia yet, but should be coming there soon (I think). It would allow > you to use @media styles for your pages. See > https://www.mediawiki.org/wiki/Help:TemplateStyles for more details. > > Templatestyles does not let you use css variables (the properties starting > with -- and the var() css function), but the example css you used could > easily be rewritten to not use that feature. > You could also just put it into User:Kaartic/common.css and wrap it in a .page-User_Kaartic selector, that is less restrictive. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] How to add custom styles to a page?
Im assuming here that you cannot just edit mediawiki:common.css What you are looking for is TemplateStyles. This is not enabled on english wikipedia yet, but should be coming there soon (I think). It would allow you to use @media styles for your pages. See https://www.mediawiki.org/wiki/Help:TemplateStyles for more details. Templatestyles does not let you use css variables (the properties starting with -- and the var() css function), but the example css you used could easily be rewritten to not use that feature. -- bawolff On Saturday, September 16, 2017, Kaartic Sivaraam < kaarticsivaraam91...@gmail.com> wrote: > I thought of using the 'layout-grid' Material design component on my user page > > to make the userboxes respond to different screen sizes. It requires custom CSS > > styles that have to be loaded when my user page is loaded. Where should I place > > the CSS styles so that they get loaded each time my use page gets loaded? > > > N.B. : I can't place them inline, see for yourself [2]. > > > [1]: https://material.io/components/web/catalog/layout-grids/ > > [2]: https://en.wikipedia.org/wiki/User:Kaartic/common.css > > > --- > > Kaartic > > > ___ > Wikitech-l mailing list > Wikitech-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikitech-l ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
[Wikitech-l] How to add custom styles to a page?
I thought of using the 'layout-grid' Material design component on my user page to make the userboxes respond to different screen sizes. It requires custom CSS styles that have to be loaded when my user page is loaded. Where should I place the CSS styles so that they get loaded each time my use page gets loaded? N.B. : I can't place them inline, see for yourself [2]. [1]: https://material.io/components/web/catalog/layout-grids/ [2]: https://en.wikipedia.org/wiki/User:Kaartic/common.css --- Kaartic ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l