Schools would be ordered to allow children to wear gender-neutral school uniforms under new plans put forward by the Liberal Democrats.

Layla Moran, the party's education spokesperson, said the existing rules were "totally out of date" and vowed to legislate to force schools in England to revise their uniform codes to ensure they are more inclusive.

Under plans to be unveiled in the Lib Dem election manifesto, headteachers would be compelled to allow children to wear shorts, trousers or skirts, regardless of their gender.

Schools in Wales have already adopted a gender-neutral policy, which means there cannot be separate dress codes for boys and girls.

The move came after in the wake of a heatwave in 2018, when some parents claimed school uniform policies were too strict.

Ms Moran, who tabled a bill on the subject in the last parliament, said: “Too many school uniform policies look totally out of date in 2019. It is time to support all children in wearing what they are happy, comfortable and confident in.

“This will give every single child the freedom to choose what uniform they wear. Dictating what they can and cannot wear because of their gender is outdated and harmful.

"By helping them be happy in what they’re wearing, we can improve learning outcomes.

“Removing the association of ‘boys’ or ‘girls’ with particular clothes in a school uniform policy may not change the way pupils dress, but it could be hugely important for many young people. It’s time to build a culture of acceptance in our schools.”

The Oxford West and Abingdon candidate previously said she had taken up the issue after hearing a 15-year-old Lib Dem member tell the party’s conference that she was forbidden from playing football on her lunch break as she could not switch her skirt for trousers.

The move was welcomed by the equality charity Stonewall, who said young people should be allowed to wear whatever was most comfortable for them.

Top 10 marginal seats to watch at the general election Show all 10 1 /10 Top 10 marginal seats to watch at the general election Top 10 marginal seats to watch at the general election North East Fife Currently held by the SNP with a majority of 2 Getty Top 10 marginal seats to watch at the general election Kensington Currently held by Labour with a majority of 20 Getty Top 10 marginal seats to watch at the general election Perth and North Perthshire Currently held by the SNP with a majority of 21 Getty Top 10 marginal seats to watch at the general election Dudley North Currently held by independent, formerly Labour, MP Ian Austin with a majority of 22 LivingInMediocrity Top 10 marginal seats to watch at the general election Newcastle-under-Lyme Currently held by Labour with a majority of 30 Derek Harper Top 10 marginal seats to watch at the general election Southampton Itchen Currently held by the Conservatives with a majority of 31 Rob Candish Top 10 marginal seats to watch at the general election Richmond Park Currently held by the Conservatives with a majority of 45 Robin Webster Top 10 marginal seats to watch at the general election Crewe and Nantwich Currently held by Labour with a majority of 48 Jaggery Top 10 marginal seats to watch at the general election Glasgow South West Currently held by the SNP with a majority of 60 Alec MacKinnon Top 10 marginal seats to watch at the general election Glasgow East Currently held by the SNP with a majority of 75 Christine Johnstone

A Stonewall spokesperson said: ‘It’s important young people aren't forced to wear something that makes them uncomfortable, so school uniforms should include dresses, skirts and trousers and these items should be available to all students.

"Gender-neutral policies shouldn’t be about banning any particular type of clothing, but making sure every young person can wear what’s most comfortable for them."

The prospect of gender-neutral uniforms has proved controversial in some quarters.

Parents and pupils protested outside the school gates of Priory School in Lewes, East Sussex, after it made trousers compulsory for new and existing pupils.

The school introduced the policy over worries about the length of skirts and apparently in response to the concerns of a small number of transgender students.

The Lib Dem plan would not make any garment compulsory, allowing children to choose.

Senior Lib Dem figures will announce the plan at a launch of the party's equality blueprint on Thursday, which will include measures to protect places of worship, tackle hate crime and improve LGBT+ rights.