Re: [Wikitech-l] How to add custom styles to a page?

2017-09-16 Thread Gergo Tisza
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] Can we drop revision hashes (rev_sha1)?

2017-09-16 Thread Antoine Musso

On 15/09/2017 12:51, Daniel Kinzler wrote:


I'm working on the database schema for Multi-Content-Revisions (MCR)
  and 
I'd
like to get rid of the rev_sha1 field:

Maintaining revision hashes (the rev_sha1 field) is expensive, and becomes more
expensive with MCR. With multiple content objects per revision, we need to track
the hash for each slot, and then re-calculate the sha1 for each revision.



Hello,

That was introduced by Aaron Schulz. The purpose is to have them pre 
computed since that is quite expensive to  have to do it on million of rows.


A use case was to easily detect reverts.

See for reference:
https://phabricator.wikimedia.org/T23860
https://phabricator.wikimedia.org/T27312

I guess Aaron Halfaker, Brion Vibber, Aaron Schulz would have some 
insights about it.




___
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?

2017-09-16 Thread Brian Wolff
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?

2017-09-16 Thread Kaartic Sivaraam
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