So what is this fight between the Scottish and UK governments all about?

Brexit means powers that have been exercised by Brussels returning to the UK. The dispute is all about what should happen to them next.

The Scotland Act, which set up the Scottish Parliament, explicitly stated anything not specifically reserved to Westminster is devolved. As such, all these powers should come to the Scottish Parliament.

However the UK Government argues it needs to take some of those powers back to allow common UK arrangements to be set up in areas such as fishing, farming and environmental regulations.

This has led SNP ministers to refer to the EU Withdrawal Bill, which would allow this to happen, as a "power grab".

What is legislative consent and why does it matter anyway?

Devolved administrations, such as the Scottish Parliament, must give their consent for Westminster to legislate in devolved areas.

As the EU Withdrawal Bill covers areas which are devolved to both Scotland and Wales, the parliaments in Edinburgh and Cardiff are required to vote on this. However even if Holyrood votes to refuse consent, Westminster can still go ahead and introduce the legislation anyway.

How can it be the case that Westminster can introduce legislation against the will of the Scottish Parliament?

The Sewel Convention, which is enshrined in the devolution legislation, states Westminster "would not normally legislate with regard to devolved matters in Scotland without the consent of the Scottish Parliament".

But, when campaigner Gina Miller challenged the UK Government over the triggering of Article 50 in the UK Supreme Court, it concluded this was not a rule which could be enforced by the courts, therefore the UK Government can pass the EU Withdrawal Bill without the consent of Holyrood.

Has Westminster ever pushed through legislation against Holyrood's wishes before?

No. When the UK Government was taking welfare reforms through Parliament, MSPs withheld consent for part of this legislation.

On that occasion the UK Government responded by removing those parts of the Bill. In the case of the EU Withdrawal Bill the UK Government has been clear it will not remove clause 11 from the legislation, despite the fact that this will constrain Holyrood's powers for up to seven years.

What happens next?

Devolution is thrust into uncharted territory, with the very real possibility that Westminster could not pass legislation against the express wishes of Holyrood for the first time since the Edinburgh Parliament was set up in 1999.

With First Minister Nicola Sturgeon due to consider the issue of a possible second independence referendum this autumn, Westminster being seen as "ignoring" Holyrood could impact on her thinking.